1 /* This C file is generated by NIT to compile module genericity. */
2 #include "genericity._sep.h"
3 val_t
genericity___MMLocalClass___get_formal(val_t self
, val_t param0
) {
4 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalClass___get_formal
, 25};
10 trace
.prev
= tracehead
; tracehead
= &trace
;
12 variable1
= ((genericity___MMLocalClass___formals_types_t
)CALL( self
,COLOR_genericity___MMLocalClass___formals_types
))( self
) /*MMLocalClass::formals_types*/;
13 variable2
= variable0
/*pos*/;
14 variable3
= TAG_Bool(UNTAG_Int( variable2
/*index*/)>=UNTAG_Int( TAG_Int(0)));
15 variable4
= variable3
;
16 if (UNTAG_Bool(variable4
)) { /* and */
17 variable4
= variable1
;
18 variable4
= ATTR_array___AbstractArray____length(variable4
) /*Array::_length*/;
19 variable4
= TAG_Bool(UNTAG_Int( variable2
/*index*/)<UNTAG_Int(variable4
));
21 variable3
= variable4
;
22 if (!UNTAG_Bool(variable3
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
23 variable3
= variable1
;
24 variable3
= ATTR_array___Array____items(variable3
) /*Array::_items*/;
25 variable3
= UNBOX_NativeArray(variable3
)[UNTAG_Int( variable2
/*index*/)];
27 return_label1
: while(false);
28 variable1
= variable3
;
30 return_label0
: while(false);
31 tracehead
= trace
.prev
;
34 void genericity___MMLocalClass___register_formal(val_t self
, val_t param0
) {
35 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalClass___register_formal
, 31};
39 trace
.prev
= tracehead
; tracehead
= &trace
;
41 variable1
= ((genericity___MMTypeFormalParameter___def_class_t
)CALL( variable0
/*f*/,COLOR_genericity___MMTypeFormalParameter___def_class
))( variable0
/*f*/) /*MMTypeFormalParameter::def_class*/;
42 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::==*/)))));
43 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalClass___register_formal
, 35); nit_exit(1);}
44 variable1
= ((genericity___MMTypeFormalParameter___position_t
)CALL( variable0
/*f*/,COLOR_genericity___MMTypeFormalParameter___position
))( variable0
/*f*/) /*MMTypeFormalParameter::position*/;
45 variable2
= ATTR_genericity___MMLocalClass____formals_types( self
) /*MMLocalClass::_formals_types*/;
46 variable2
= ((array___AbstractArray___length_t
)CALL(variable2
,COLOR_abstract_collection___Collection___length
))(variable2
) /*Array::length*/;
47 variable1
= TAG_Bool((variable1
)==(variable2
));
48 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalClass___register_formal
, 36); nit_exit(1);}
49 variable1
= ATTR_genericity___MMLocalClass____formals_types( self
) /*MMLocalClass::_formals_types*/;
50 ((array___AbstractArray___add_t
)CALL(variable1
,COLOR_abstract_collection___SimpleCollection___add
))(variable1
, variable0
/*f*/) /*Array::add*/;
51 tracehead
= trace
.prev
;
54 val_t
genericity___MMLocalClass___get_instantiate_type(val_t self
, val_t param0
) {
55 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalClass___get_instantiate_type
, 43};
60 trace
.prev
= tracehead
; tracehead
= &trace
;
62 variable1
= ATTR_genericity___MMLocalClass____types( self
) /*MMLocalClass::_types*/;
63 variable1
= ((array___AbstractArray___iterator_t
)CALL(variable1
,COLOR_abstract_collection___Collection___iterator
))(variable1
) /*Array::iterator*/;
64 while (true) { /*for*/
65 variable2
= ((array___ArrayIterator___is_ok_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___is_ok
))(variable1
) /*ArrayIterator::is_ok*/;
66 if (!UNTAG_Bool(variable2
)) break; /*for*/
67 variable2
= ((array___ArrayIterator___item_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___item
))(variable1
) /*ArrayIterator::item*/;
68 variable3
= ((genericity___MMTypeGeneric___params_equals_t
)CALL( variable2
/*g*/,COLOR_genericity___MMTypeGeneric___params_equals
))( variable2
/*g*/, variable0
/*t*/) /*MMTypeGeneric::params_equals*/;
69 if (UNTAG_Bool(variable3
)) { /*if*/
70 variable1
= variable2
/*g*/;
74 ((array___ArrayIterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*ArrayIterator::next*/;
77 variable2
= NEW_genericity___MMTypeGeneric___init( self
, variable0
/*t*/); /*new MMTypeGeneric*/
78 variable1
= variable2
;
79 variable2
= ATTR_genericity___MMLocalClass____types( self
) /*MMLocalClass::_types*/;
80 ((array___AbstractArray___add_t
)CALL(variable2
,COLOR_abstract_collection___SimpleCollection___add
))(variable2
, variable1
/*g*/) /*Array::add*/;
81 variable1
= variable1
/*g*/;
83 return_label3
: while(false);
84 tracehead
= trace
.prev
;
87 val_t
genericity___MMLocalClass___formals_types(val_t self
) {
88 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalClass___formals_types
, 57};
97 trace
.prev
= tracehead
; tracehead
= &trace
;
98 variable0
= ATTR_genericity___MMLocalClass____formals_types( self
) /*MMLocalClass::_formals_types*/;
99 variable0
= ((array___AbstractArray___is_empty_t
)CALL(variable0
,COLOR_abstract_collection___Collection___is_empty
))(variable0
) /*Array::is_empty*/;
100 if (UNTAG_Bool(variable0
)) { /*if*/
101 variable0
= TAG_Bool(( self
==NIT_NULL
) || VAL_ISA( self
, COLOR_MMConcreteClass
, ID_MMConcreteClass
)) /*cast MMConcreteClass*/;
102 if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable0
)))) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalClass___formals_types
, 62); nit_exit(1);}
103 variable0
= ((abstractmetamodel___MMLocalClass___arity_t
)CALL( self
,COLOR_abstractmetamodel___MMLocalClass___arity
))( self
) /*MMLocalClass::arity*/;
104 variable1
= NEW_range___Range___without_last( TAG_Int(0), variable0
); /*new Range[Int]*/
105 variable0
= variable1
;
106 variable0
= ((range___Range___iterator_t
)CALL(variable0
,COLOR_abstract_collection___Collection___iterator
))(variable0
) /*Range::iterator*/;
107 while (true) { /*for*/
108 variable1
= ((abstract_collection___Iterator___is_ok_t
)CALL(variable0
,COLOR_abstract_collection___Iterator___is_ok
))(variable0
) /*Iterator::is_ok*/;
109 if (!UNTAG_Bool(variable1
)) break; /*for*/
110 variable1
= ((abstract_collection___Iterator___item_t
)CALL(variable0
,COLOR_abstract_collection___Iterator___item
))(variable0
) /*Iterator::item*/;
111 variable3
= ((abstractmetamodel___MMLocalClass___global_t
)CALL( self
,COLOR_abstractmetamodel___MMLocalClass___global
))( self
) /*MMLocalClass::global*/;
112 variable3
= ((abstractmetamodel___MMGlobalClass___intro_t
)CALL(variable3
,COLOR_abstractmetamodel___MMGlobalClass___intro
))(variable3
) /*MMGlobalClass::intro*/;
113 variable3
= ((genericity___MMLocalClass___get_formal_t
)CALL(variable3
,COLOR_genericity___MMLocalClass___get_formal
))(variable3
, variable1
/*i*/) /*MMLocalClass::get_formal*/;
114 variable2
= variable3
;
115 variable4
= ((type_formal___MMTypeFormal___name_t
)CALL( variable2
/*oft*/,COLOR_type_formal___MMTypeFormal___name
))( variable2
/*oft*/) /*MMTypeFormalParameter::name*/;
116 variable5
= NEW_genericity___MMTypeFormalParameter___init(variable4
, variable1
/*i*/, self
); /*new MMTypeFormalParameter*/
117 variable4
= variable5
;
118 variable3
= variable4
;
119 ((genericity___MMLocalClass___register_formal_t
)CALL( self
,COLOR_genericity___MMLocalClass___register_formal
))( self
, variable3
/*ft*/) /*MMLocalClass::register_formal*/;
120 continue_6
: while(0);
121 ((abstract_collection___Iterator___next_t
)CALL(variable0
,COLOR_abstract_collection___Iterator___next
))(variable0
) /*Iterator::next*/;
124 variable0
= ((abstractmetamodel___MMLocalClass___arity_t
)CALL( self
,COLOR_abstractmetamodel___MMLocalClass___arity
))( self
) /*MMLocalClass::arity*/;
125 variable1
= NEW_range___Range___without_last( TAG_Int(0), variable0
); /*new Range[Int]*/
126 variable0
= variable1
;
127 variable0
= ((range___Range___iterator_t
)CALL(variable0
,COLOR_abstract_collection___Collection___iterator
))(variable0
) /*Range::iterator*/;
128 while (true) { /*for*/
129 variable1
= ((abstract_collection___Iterator___is_ok_t
)CALL(variable0
,COLOR_abstract_collection___Iterator___is_ok
))(variable0
) /*Iterator::is_ok*/;
130 if (!UNTAG_Bool(variable1
)) break; /*for*/
131 variable1
= ((abstract_collection___Iterator___item_t
)CALL(variable0
,COLOR_abstract_collection___Iterator___item
))(variable0
) /*Iterator::item*/;
132 variable3
= ((abstractmetamodel___MMLocalClass___global_t
)CALL( self
,COLOR_abstractmetamodel___MMLocalClass___global
))( self
) /*MMLocalClass::global*/;
133 variable3
= ((abstractmetamodel___MMGlobalClass___intro_t
)CALL(variable3
,COLOR_abstractmetamodel___MMGlobalClass___intro
))(variable3
) /*MMGlobalClass::intro*/;
134 variable3
= ((genericity___MMLocalClass___get_formal_t
)CALL(variable3
,COLOR_genericity___MMLocalClass___get_formal
))(variable3
, variable1
/*i*/) /*MMLocalClass::get_formal*/;
135 variable2
= variable3
;
136 variable4
= ATTR_genericity___MMLocalClass____formals_types( self
) /*MMLocalClass::_formals_types*/;
137 variable5
= variable1
/*i*/;
138 variable6
= TAG_Bool(UNTAG_Int( variable5
/*index*/)>=UNTAG_Int( TAG_Int(0)));
139 variable7
= variable6
;
140 if (UNTAG_Bool(variable7
)) { /* and */
141 variable7
= variable4
;
142 variable7
= ATTR_array___AbstractArray____length(variable7
) /*Array::_length*/;
143 variable7
= TAG_Bool(UNTAG_Int( variable5
/*index*/)<UNTAG_Int(variable7
));
145 variable6
= variable7
;
146 if (!UNTAG_Bool(variable6
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
147 variable6
= variable4
;
148 variable6
= ATTR_array___Array____items(variable6
) /*Array::_items*/;
149 variable6
= UNBOX_NativeArray(variable6
)[UNTAG_Int( variable5
/*index*/)];
151 return_label8
: while(false);
152 variable4
= variable6
;
153 variable3
= variable4
;
154 variable4
= ((type_formal___MMTypeFormal___bound_t
)CALL( variable2
/*oft*/,COLOR_type_formal___MMTypeFormal___bound
))( variable2
/*oft*/) /*MMTypeFormalParameter::bound*/;
155 variable5
= ((abstractmetamodel___MMLocalClass___module_t
)CALL( self
,COLOR_abstractmetamodel___MMLocalClass___module
))( self
) /*MMLocalClass::module*/;
156 variable4
= ((static_type___MMType___for_module_t
)CALL(variable4
,COLOR_static_type___MMType___for_module
))(variable4
, variable5
) /*MMType::for_module*/;
157 ((genericity___MMTypeFormalParameter___bound__eq_t
)CALL( variable3
/*ft*/,COLOR_genericity___MMTypeFormalParameter___bound__eq
))( variable3
/*ft*/, variable4
) /*MMTypeFormalParameter::bound=*/;
158 continue_7
: while(0);
159 ((abstract_collection___Iterator___next_t
)CALL(variable0
,COLOR_abstract_collection___Iterator___next
))(variable0
) /*Iterator::next*/;
163 variable0
= ATTR_genericity___MMLocalClass____formals_types( self
) /*MMLocalClass::_formals_types*/;
165 return_label5
: while(false);
166 tracehead
= trace
.prev
;
169 val_t
genericity___MMLocalClass___get_type(val_t self
) {
170 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalClass___get_type
, 80};
173 trace
.prev
= tracehead
; tracehead
= &trace
;
174 variable0
= ATTR_static_type___MMLocalClass____base_type_cache( self
) /*MMLocalClass::_base_type_cache*/;
175 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::==*/)))));
176 variable1
= variable0
;
177 if (UNTAG_Bool(variable1
)) { /* and */
178 variable1
= ((genericity___MMLocalClass___is_generic_t
)CALL( self
,COLOR_genericity___MMLocalClass___is_generic
))( self
) /*MMLocalClass::is_generic*/;
180 variable0
= variable1
;
181 if (UNTAG_Bool(variable0
)) { /*if*/
182 variable0
= ((genericity___MMLocalClass___formals_types_t
)CALL( self
,COLOR_genericity___MMLocalClass___formals_types
))( self
) /*MMLocalClass::formals_types*/;
183 variable0
= ((genericity___MMLocalClass___get_instantiate_type_t
)CALL( self
,COLOR_genericity___MMLocalClass___get_instantiate_type
))( self
, variable0
) /*MMLocalClass::get_instantiate_type*/;
184 ATTR_static_type___MMLocalClass____base_type_cache( self
) /*MMLocalClass::_base_type_cache*/ = variable0
;
185 variable0
= ATTR_static_type___MMLocalClass____base_type_cache( self
) /*MMLocalClass::_base_type_cache*/;
188 variable0
= ((genericity___MMLocalClass___get_type_t
)CALL( self
,COLOR_SUPER_genericity___MMLocalClass___get_type
))( self
) /*super MMLocalClass::get_type*/;
191 return_label9
: while(false);
192 tracehead
= trace
.prev
;
195 val_t
genericity___MMLocalClass___is_generic(val_t self
) {
196 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalClass___is_generic
, 90};
198 trace
.prev
= tracehead
; tracehead
= &trace
;
199 variable0
= ((abstractmetamodel___MMLocalClass___arity_t
)CALL( self
,COLOR_abstractmetamodel___MMLocalClass___arity
))( self
) /*MMLocalClass::arity*/;
200 variable0
= TAG_Bool(UNTAG_Int(variable0
)>UNTAG_Int( TAG_Int(0)));
202 return_label10
: while(false);
203 tracehead
= trace
.prev
;
206 val_t
genericity___MMSignature___adaptation_to(val_t self
, val_t param0
) {
207 struct trace_t trace
= {NULL
, LOCATE_genericity___MMSignature___adaptation_to
, 95};
214 trace
.prev
= tracehead
; tracehead
= &trace
;
216 variable1
= ATTR_static_type___MMSignature____recv( self
) /*MMSignature::_recv*/;
217 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::==*/)))));
218 if (UNTAG_Bool(variable1
)) { /*if*/
222 variable2
= ((static_type___MMType___module_t
)CALL( variable0
/*r*/,COLOR_static_type___MMType___module
))( variable0
/*r*/) /*MMType::module*/;
223 variable1
= variable2
;
224 variable3
= ATTR_static_type___MMSignature____params( self
) /*MMSignature::_params*/;
225 variable2
= variable3
;
226 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::==*/)))));
227 if (UNTAG_Bool(variable3
)) { /*if*/
228 variable3
= NEW_array___Array___init(); /*new Array[MMType]*/
229 variable2
= variable3
/*p=*/;
230 variable3
= ATTR_static_type___MMSignature____params( self
) /*MMSignature::_params*/;
231 variable3
= ((array___AbstractArray___iterator_t
)CALL(variable3
,COLOR_abstract_collection___Collection___iterator
))(variable3
) /*Array::iterator*/;
232 while (true) { /*for*/
233 variable4
= ((array___ArrayIterator___is_ok_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___is_ok
))(variable3
) /*ArrayIterator::is_ok*/;
234 if (!UNTAG_Bool(variable4
)) break; /*for*/
235 variable4
= ((array___ArrayIterator___item_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___item
))(variable3
) /*ArrayIterator::item*/;
236 variable5
= ((static_type___MMType___for_module_t
)CALL( variable4
/*i*/,COLOR_static_type___MMType___for_module
))( variable4
/*i*/, variable1
/*mod*/) /*MMType::for_module*/;
237 variable5
= ((static_type___MMType___adapt_to_t
)CALL(variable5
,COLOR_static_type___MMType___adapt_to
))(variable5
, variable0
/*r*/) /*MMType::adapt_to*/;
238 ((array___AbstractArray___add_t
)CALL( variable2
/*p*/,COLOR_abstract_collection___SimpleCollection___add
))( variable2
/*p*/, variable5
) /*Array::add*/;
239 continue_12
: while(0);
240 ((array___ArrayIterator___next_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___next
))(variable3
) /*ArrayIterator::next*/;
244 variable4
= ATTR_static_type___MMSignature____return_type( self
) /*MMSignature::_return_type*/;
245 variable3
= variable4
;
246 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::==*/)))))));
247 if (UNTAG_Bool(variable4
)) { /*if*/
248 variable4
= ((static_type___MMType___for_module_t
)CALL( variable3
/*rv*/,COLOR_static_type___MMType___for_module
))( variable3
/*rv*/, variable1
/*mod*/) /*MMType::for_module*/;
249 variable4
= ((static_type___MMType___adapt_to_t
)CALL(variable4
,COLOR_static_type___MMType___adapt_to
))(variable4
, variable0
/*r*/) /*MMType::adapt_to*/;
250 variable3
= variable4
/*rv=*/;
252 variable4
= NEW_static_type___MMSignature___init( variable2
/*p*/, variable3
/*rv*/, variable0
/*r*/); /*new MMSignature*/
253 variable1
= variable4
;
255 return_label11
: while(false);
256 tracehead
= trace
.prev
;
259 val_t
genericity___MMLocalProperty___recv(val_t self
) {
260 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalProperty___recv
, 121};
262 trace
.prev
= tracehead
; tracehead
= &trace
;
263 variable0
= ((genericity___MMLocalProperty___signature_t
)CALL( self
,COLOR_static_type___MMLocalProperty___signature
))( self
) /*MMLocalProperty::signature*/;
264 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::==*/)))))));
265 if (!UNTAG_Bool(variable0
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalProperty___recv
, 123); nit_exit(1);}
266 variable0
= ((genericity___MMLocalProperty___signature_t
)CALL( self
,COLOR_static_type___MMLocalProperty___signature
))( self
) /*MMLocalProperty::signature*/;
267 variable0
= ((static_type___MMSignature___recv_t
)CALL(variable0
,COLOR_static_type___MMSignature___recv
))(variable0
) /*MMSignature::recv*/;
269 return_label13
: while(false);
270 tracehead
= trace
.prev
;
273 void genericity___MMLocalProperty___recv__eq(val_t self
, val_t param0
) {
274 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalProperty___recv__eq
, 127};
277 trace
.prev
= tracehead
; tracehead
= &trace
;
279 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::==*/)))))));
280 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalProperty___recv__eq
, 129); nit_exit(1);}
281 variable1
= ATTR_static_type___MMLocalProperty____signature_cache( self
) /*MMLocalProperty::_signature_cache*/;
282 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::==*/)))));
283 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalProperty___recv__eq
, 131); nit_exit(1);}
284 ATTR_genericity___MMLocalProperty____recv_alone( self
) /*MMLocalProperty::_recv_alone*/ = variable0
/*rec*/;
285 tracehead
= trace
.prev
;
288 val_t
genericity___MMLocalProperty___signature(val_t self
) {
289 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalProperty___signature
, 135};
295 trace
.prev
= tracehead
; tracehead
= &trace
;
296 variable1
= ATTR_static_type___MMLocalProperty____signature_cache( self
) /*MMLocalProperty::_signature_cache*/;
297 variable0
= variable1
;
298 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::==*/)))))));
299 if (UNTAG_Bool(variable1
)) { /*if*/
300 variable0
= variable0
/*sig*/;
303 variable1
= TAG_Bool(( self
==NIT_NULL
) || VAL_ISA( self
, COLOR_MMConcreteProperty
, ID_MMConcreteProperty
)) /*cast MMConcreteProperty*/;
304 if (UNTAG_Bool(variable1
)) { /*if*/
305 variable0
= NIT_NULL
/*null*/;
308 variable2
= ATTR_abstractmetamodel___MMLocalProperty____super_prop( self
) /*MMLocalProperty::_super_prop*/;
309 variable1
= variable2
;
310 variable3
= ATTR_abstractmetamodel___MMLocalProperty____concrete_property( self
) /*MMLocalProperty::_concrete_property*/;
311 variable2
= variable3
;
312 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::==*/)))));
313 if (UNTAG_Bool(variable3
)) { /*if*/
314 variable3
= ((genericity___MMLocalProperty___signature_t
)CALL( variable2
/*impl*/,COLOR_static_type___MMLocalProperty___signature
))( variable2
/*impl*/) /*MMConcreteProperty::signature*/;
315 ATTR_static_type___MMLocalProperty____signature_cache( self
) /*MMLocalProperty::_signature_cache*/ = variable3
;
316 variable3
= ATTR_static_type___MMLocalProperty____signature_cache( self
) /*MMLocalProperty::_signature_cache*/;
317 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::==*/)))))));
318 if (!UNTAG_Bool(variable3
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalProperty___signature
, 150); nit_exit(1);}
320 variable3
= ((genericity___MMLocalProperty___signature_t
)CALL( variable1
/*sp*/,COLOR_static_type___MMLocalProperty___signature
))( variable1
/*sp*/) /*MMLocalProperty::signature*/;
321 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::==*/)))))));
322 if (!UNTAG_Bool(variable3
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalProperty___signature
, 153); nit_exit(1);}
323 variable3
= ATTR_genericity___MMLocalProperty____recv_alone( self
) /*MMLocalProperty::_recv_alone*/;
324 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::==*/)))))));
325 if (!UNTAG_Bool(variable3
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalProperty___signature
, 154); nit_exit(1);}
326 variable3
= ((genericity___MMLocalProperty___signature_t
)CALL( variable1
/*sp*/,COLOR_static_type___MMLocalProperty___signature
))( variable1
/*sp*/) /*MMLocalProperty::signature*/;
327 variable4
= ATTR_genericity___MMLocalProperty____recv_alone( self
) /*MMLocalProperty::_recv_alone*/;
328 variable3
= ((genericity___MMSignature___adaptation_to_t
)CALL(variable3
,COLOR_genericity___MMSignature___adaptation_to
))(variable3
, variable4
) /*MMSignature::adaptation_to*/;
329 ATTR_static_type___MMLocalProperty____signature_cache( self
) /*MMLocalProperty::_signature_cache*/ = variable3
;
331 variable3
= ATTR_static_type___MMLocalProperty____signature_cache( self
) /*MMLocalProperty::_signature_cache*/;
332 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::==*/)))))));
333 if (!UNTAG_Bool(variable3
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalProperty___signature
, 158); nit_exit(1);}
334 variable3
= ATTR_static_type___MMLocalProperty____signature_cache( self
) /*MMLocalProperty::_signature_cache*/;
335 variable0
= variable3
;
337 return_label15
: while(false);
338 tracehead
= trace
.prev
;
341 val_t
genericity___MMLocalProperty___adapt_property(val_t self
, val_t param0
) {
342 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalProperty___adapt_property
, 163};
346 trace
.prev
= tracehead
; tracehead
= &trace
;
348 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::==*/)))))));
349 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMLocalProperty___adapt_property
, 167); nit_exit(1);}
350 variable2
= ((abstractmetamodel___MMLocalProperty___local_class_t
)CALL( self
,COLOR_abstractmetamodel___MMLocalProperty___local_class
))( self
) /*MMLocalProperty::local_class*/;
351 variable2
= ((genericity___MMLocalClass___get_type_t
)CALL(variable2
,COLOR_static_type___MMLocalClass___get_type
))(variable2
) /*MMLocalClass::get_type*/;
352 variable1
= variable2
;
353 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::==*/)))));
354 if (UNTAG_Bool(variable2
)) { /*if*/
358 variable2
= ((inheritance___MMLocalProperty___inherit_to_t
)CALL( self
,COLOR_inheritance___MMLocalProperty___inherit_to
))( self
, variable0
/*t*/) /*MMLocalProperty::inherit_to*/;
359 variable1
= variable2
;
362 return_label16
: while(false);
363 tracehead
= trace
.prev
;
366 void genericity___MMLocalProperty___inherit_from(val_t self
, val_t param0
, val_t param1
) {
367 struct trace_t trace
= {NULL
, LOCATE_genericity___MMLocalProperty___inherit_from
, 176};
370 trace
.prev
= tracehead
; tracehead
= &trace
;
373 ((genericity___MMLocalProperty___inherit_from_t
)CALL( self
,COLOR_SUPER_genericity___MMLocalProperty___inherit_from
))( self
, param0
, param1
) /*super MMLocalProperty::inherit_from*/;
374 ATTR_genericity___MMLocalProperty____recv_alone( self
) /*MMLocalProperty::_recv_alone*/ = variable1
/*t*/;
375 tracehead
= trace
.prev
;
378 val_t
genericity___MMType___is_generic(val_t self
) {
379 struct trace_t trace
= {NULL
, LOCATE_genericity___MMType___is_generic
, 184};
380 trace
.prev
= tracehead
; tracehead
= &trace
;
381 fprintf(stderr
, "Deferred method %s called (%s: %d)\n", "is_generic", LOCATE_genericity___MMLocalProperty___inherit_from
, 184);
383 tracehead
= trace
.prev
;
386 val_t
genericity___MMTypeFormal___is_generic(val_t self
) {
387 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormal___is_generic
, 189};
389 trace
.prev
= tracehead
; tracehead
= &trace
;
390 variable0
= ATTR_type_formal___MMTypeFormal____bound( self
) /*MMTypeFormal::_bound*/;
391 variable0
= ((genericity___MMType___is_generic_t
)CALL(variable0
,COLOR_genericity___MMType___is_generic
))(variable0
) /*MMType::is_generic*/;
393 return_label18
: while(false);
394 tracehead
= trace
.prev
;
397 val_t
genericity___MMTypeSimpleClass___is_generic(val_t self
) {
398 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeSimpleClass___is_generic
, 193};
400 trace
.prev
= tracehead
; tracehead
= &trace
;
401 variable0
= TAG_Bool(false);
403 return_label19
: while(false);
404 tracehead
= trace
.prev
;
407 val_t
genericity___MMTypeGeneric___params(val_t self
) {
408 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___params
, 198};
409 trace
.prev
= tracehead
; tracehead
= &trace
;
410 tracehead
= trace
.prev
;
411 return ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/;
413 val_t
genericity___MMTypeGeneric___is_generic(val_t self
) {
414 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___is_generic
, 202};
416 trace
.prev
= tracehead
; tracehead
= &trace
;
417 variable0
= TAG_Bool(true);
419 return_label20
: while(false);
420 tracehead
= trace
.prev
;
423 val_t
genericity___MMTypeGeneric___is_supertype(val_t self
, val_t param0
) {
424 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___is_supertype
, 204};
428 trace
.prev
= tracehead
; tracehead
= &trace
;
430 variable1
= ((static_type___MMType___local_class_t
)CALL( variable0
/*t*/,COLOR_static_type___MMType___local_class
))( variable0
/*t*/) /*MMType::local_class*/;
431 variable1
= ((abstractmetamodel___MMLocalClass___cshe_t
)CALL(variable1
,COLOR_abstractmetamodel___MMLocalClass___cshe
))(variable1
) /*MMLocalClass::cshe*/;
432 variable2
= ATTR_static_type___MMTypeClass____local_class( self
) /*MMTypeGeneric::_local_class*/;
433 variable1
= ((partial_order___PartialOrderElement_____leq_t
)CALL(variable1
,COLOR_partial_order___PartialOrderElement_____leq
))(variable1
, variable2
) /*PartialOrderElement::<=*/;
434 if (UNTAG_Bool(variable1
)) { /*if*/
435 variable2
= ATTR_static_type___MMTypeClass____local_class( self
) /*MMTypeGeneric::_local_class*/;
436 variable2
= ((static_type___MMType___upcast_for_t
)CALL( variable0
/*t*/,COLOR_static_type___MMType___upcast_for
))( variable0
/*t*/, variable2
) /*MMType::upcast_for*/;
437 variable1
= variable2
;
438 variable2
= TAG_Bool(( variable1
/*u*/==NIT_NULL
) || VAL_ISA( variable1
/*u*/, COLOR_MMTypeGeneric
, ID_MMTypeGeneric
)) /*cast MMTypeGeneric*/;
439 if (UNTAG_Bool(variable2
)) { /*if*/
440 variable2
= ((genericity___MMTypeGeneric___is_subtype_t
)CALL( self
,COLOR_genericity___MMTypeGeneric___is_subtype
))( self
, variable1
/*u*/) /*MMTypeGeneric::is_subtype*/;
441 variable1
= variable2
;
445 variable1
= TAG_Bool(false);
447 return_label21
: while(false);
448 tracehead
= trace
.prev
;
451 val_t
genericity___MMTypeGeneric___upcast_for(val_t self
, val_t param0
) {
452 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___upcast_for
, 215};
456 trace
.prev
= tracehead
; tracehead
= &trace
;
458 variable2
= ((genericity___MMTypeGeneric___upcast_for_t
)CALL( self
,COLOR_SUPER_genericity___MMTypeGeneric___upcast_for
))( self
, param0
) /*super MMTypeGeneric::upcast_for*/;
459 variable1
= variable2
;
460 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::==*/)))))));
461 if (UNTAG_Bool(variable2
)) { /*if*/
462 variable2
= ((static_type___MMType___adapt_to_t
)CALL( variable1
/*t*/,COLOR_static_type___MMType___adapt_to
))( variable1
/*t*/, self
) /*MMType::adapt_to*/;
463 variable1
= variable2
/*t=*/;
465 variable1
= variable1
/*t*/;
467 return_label22
: while(false);
468 tracehead
= trace
.prev
;
471 val_t
genericity___MMTypeGeneric___for_module(val_t self
, val_t param0
) {
472 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___for_module
, 224};
479 trace
.prev
= tracehead
; tracehead
= &trace
;
482 variable2
= ((static_type___MMTypeClass___module_t
)CALL( self
,COLOR_static_type___MMType___module
))( self
) /*MMTypeGeneric::module*/;
483 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::==*/)))))));
484 if (UNTAG_Bool(variable2
)) { /*if*/
485 variable3
= NEW_array___Array___init(); /*new Array[MMType]*/
486 variable2
= variable3
;
487 variable3
= ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/;
488 variable3
= ((array___AbstractArray___iterator_t
)CALL(variable3
,COLOR_abstract_collection___Collection___iterator
))(variable3
) /*Array::iterator*/;
489 while (true) { /*for*/
490 variable4
= ((array___ArrayIterator___is_ok_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___is_ok
))(variable3
) /*ArrayIterator::is_ok*/;
491 if (!UNTAG_Bool(variable4
)) break; /*for*/
492 variable4
= ((array___ArrayIterator___item_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___item
))(variable3
) /*ArrayIterator::item*/;
493 variable5
= ((static_type___MMType___for_module_t
)CALL( variable4
/*p*/,COLOR_static_type___MMType___for_module
))( variable4
/*p*/, variable0
/*mod*/) /*MMType::for_module*/;
494 ((array___AbstractArray___add_t
)CALL( variable2
/*parms*/,COLOR_abstract_collection___SimpleCollection___add
))( variable2
/*parms*/, variable5
) /*Array::add*/;
495 continue_24
: while(0);
496 ((array___ArrayIterator___next_t
)CALL(variable3
,COLOR_abstract_collection___Iterator___next
))(variable3
) /*ArrayIterator::next*/;
499 variable4
= ATTR_static_type___MMTypeClass____local_class( self
) /*MMTypeGeneric::_local_class*/;
500 variable4
= ((abstractmetamodel___MMLocalClass___for_module_t
)CALL(variable4
,COLOR_abstractmetamodel___MMLocalClass___for_module
))(variable4
, variable0
/*mod*/) /*MMLocalClass::for_module*/;
501 variable3
= variable4
;
502 variable4
= ((genericity___MMLocalClass___get_instantiate_type_t
)CALL( variable3
/*b*/,COLOR_genericity___MMLocalClass___get_instantiate_type
))( variable3
/*b*/, variable2
/*parms*/) /*MMLocalClass::get_instantiate_type*/;
503 variable1
= variable4
/*t=*/;
505 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::==*/)))))));
506 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMTypeGeneric___for_module
, 235); nit_exit(1);}
507 variable1
= variable1
/*t*/;
509 return_label23
: while(false);
510 tracehead
= trace
.prev
;
513 val_t
genericity___MMTypeGeneric___adapt_to(val_t self
, val_t param0
) {
514 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___adapt_to
, 239};
520 trace
.prev
= tracehead
; tracehead
= &trace
;
522 variable2
= NEW_array___Array___init(); /*new Array[MMType]*/
523 variable1
= variable2
;
524 variable2
= ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/;
525 variable2
= ((array___AbstractArray___iterator_t
)CALL(variable2
,COLOR_abstract_collection___Collection___iterator
))(variable2
) /*Array::iterator*/;
526 while (true) { /*for*/
527 variable3
= ((array___ArrayIterator___is_ok_t
)CALL(variable2
,COLOR_abstract_collection___Iterator___is_ok
))(variable2
) /*ArrayIterator::is_ok*/;
528 if (!UNTAG_Bool(variable3
)) break; /*for*/
529 variable3
= ((array___ArrayIterator___item_t
)CALL(variable2
,COLOR_abstract_collection___Iterator___item
))(variable2
) /*ArrayIterator::item*/;
530 variable4
= ((static_type___MMType___adapt_to_t
)CALL( variable3
/*i*/,COLOR_static_type___MMType___adapt_to
))( variable3
/*i*/, variable0
/*r*/) /*MMType::adapt_to*/;
531 ((array___AbstractArray___add_t
)CALL( variable1
/*rv*/,COLOR_abstract_collection___SimpleCollection___add
))( variable1
/*rv*/, variable4
) /*Array::add*/;
532 continue_26
: while(0);
533 ((array___ArrayIterator___next_t
)CALL(variable2
,COLOR_abstract_collection___Iterator___next
))(variable2
) /*ArrayIterator::next*/;
536 variable3
= ATTR_static_type___MMTypeClass____local_class( self
) /*MMTypeGeneric::_local_class*/;
537 variable3
= ((genericity___MMLocalClass___get_instantiate_type_t
)CALL(variable3
,COLOR_genericity___MMLocalClass___get_instantiate_type
))(variable3
, variable1
/*rv*/) /*MMLocalClass::get_instantiate_type*/;
538 variable2
= variable3
;
539 variable1
= variable2
/*l*/;
541 return_label25
: while(false);
542 tracehead
= trace
.prev
;
545 val_t
genericity___MMTypeGeneric___params_equals(val_t self
, val_t param0
) {
546 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___params_equals
, 249};
554 trace
.prev
= tracehead
; tracehead
= &trace
;
556 variable1
= ((array___AbstractArray___length_t
)CALL( variable0
/*t*/,COLOR_abstract_collection___Collection___length
))( variable0
/*t*/) /*Array::length*/;
557 variable2
= ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/;
558 variable2
= ((array___AbstractArray___length_t
)CALL(variable2
,COLOR_abstract_collection___Collection___length
))(variable2
) /*Array::length*/;
559 variable1
= TAG_Bool((variable1
)!=(variable2
));
560 if (UNTAG_Bool(variable1
)) { /*if*/
561 variable1
= TAG_Bool(false);
564 variable1
= ((array___AbstractArray___length_t
)CALL( variable0
/*t*/,COLOR_abstract_collection___Collection___length
))( variable0
/*t*/) /*Array::length*/;
565 variable2
= NEW_range___Range___without_last( TAG_Int(0), variable1
); /*new Range[Int]*/
566 variable1
= variable2
;
567 variable1
= ((range___Range___iterator_t
)CALL(variable1
,COLOR_abstract_collection___Collection___iterator
))(variable1
) /*Range::iterator*/;
568 while (true) { /*for*/
569 variable2
= ((abstract_collection___Iterator___is_ok_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___is_ok
))(variable1
) /*Iterator::is_ok*/;
570 if (!UNTAG_Bool(variable2
)) break; /*for*/
571 variable2
= ((abstract_collection___Iterator___item_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___item
))(variable1
) /*Iterator::item*/;
572 variable3
= ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/;
573 variable4
= variable2
/*i*/;
574 variable5
= TAG_Bool(UNTAG_Int( variable4
/*index*/)>=UNTAG_Int( TAG_Int(0)));
575 variable6
= variable5
;
576 if (UNTAG_Bool(variable6
)) { /* and */
577 variable6
= variable3
;
578 variable6
= ATTR_array___AbstractArray____length(variable6
) /*Array::_length*/;
579 variable6
= TAG_Bool(UNTAG_Int( variable4
/*index*/)<UNTAG_Int(variable6
));
581 variable5
= variable6
;
582 if (!UNTAG_Bool(variable5
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
583 variable5
= variable3
;
584 variable5
= ATTR_array___Array____items(variable5
) /*Array::_items*/;
585 variable5
= UNBOX_NativeArray(variable5
)[UNTAG_Int( variable4
/*index*/)];
587 return_label29
: while(false);
588 variable3
= variable5
;
589 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::==*/)))))));
590 if (!UNTAG_Bool(variable3
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_array___Array_____bra
, 255); nit_exit(1);}
591 variable3
= variable2
/*i*/;
592 variable4
= TAG_Bool(UNTAG_Int( variable3
/*index*/)>=UNTAG_Int( TAG_Int(0)));
593 variable5
= variable4
;
594 if (UNTAG_Bool(variable5
)) { /* and */
595 variable5
= ATTR_array___AbstractArray____length( variable0
/*t*/) /*Array::_length*/;
596 variable5
= TAG_Bool(UNTAG_Int( variable3
/*index*/)<UNTAG_Int(variable5
));
598 variable4
= variable5
;
599 if (!UNTAG_Bool(variable4
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
600 variable4
= ATTR_array___Array____items( variable0
/*t*/) /*Array::_items*/;
601 variable4
= UNBOX_NativeArray(variable4
)[UNTAG_Int( variable3
/*index*/)];
603 return_label30
: while(false);
604 variable3
= variable4
;
605 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::==*/)))))));
606 if (!UNTAG_Bool(variable3
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_array___Array_____bra
, 256); nit_exit(1);}
607 variable3
= ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/;
608 variable4
= variable2
/*i*/;
609 variable5
= TAG_Bool(UNTAG_Int( variable4
/*index*/)>=UNTAG_Int( TAG_Int(0)));
610 variable6
= variable5
;
611 if (UNTAG_Bool(variable6
)) { /* and */
612 variable6
= variable3
;
613 variable6
= ATTR_array___AbstractArray____length(variable6
) /*Array::_length*/;
614 variable6
= TAG_Bool(UNTAG_Int( variable4
/*index*/)<UNTAG_Int(variable6
));
616 variable5
= variable6
;
617 if (!UNTAG_Bool(variable5
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
618 variable5
= variable3
;
619 variable5
= ATTR_array___Array____items(variable5
) /*Array::_items*/;
620 variable5
= UNBOX_NativeArray(variable5
)[UNTAG_Int( variable4
/*index*/)];
622 return_label31
: while(false);
623 variable3
= variable5
;
624 variable4
= variable2
/*i*/;
625 variable5
= TAG_Bool(UNTAG_Int( variable4
/*index*/)>=UNTAG_Int( TAG_Int(0)));
626 variable6
= variable5
;
627 if (UNTAG_Bool(variable6
)) { /* and */
628 variable6
= ATTR_array___AbstractArray____length( variable0
/*t*/) /*Array::_length*/;
629 variable6
= TAG_Bool(UNTAG_Int( variable4
/*index*/)<UNTAG_Int(variable6
));
631 variable5
= variable6
;
632 if (!UNTAG_Bool(variable5
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
633 variable5
= ATTR_array___Array____items( variable0
/*t*/) /*Array::_items*/;
634 variable5
= UNBOX_NativeArray(variable5
)[UNTAG_Int( variable4
/*index*/)];
636 return_label32
: while(false);
637 variable4
= variable5
;
638 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::==*/)))))));
639 if (UNTAG_Bool(variable3
)) { /*if*/
640 variable1
= TAG_Bool(false);
643 continue_28
: while(0);
644 ((abstract_collection___Iterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*Iterator::next*/;
647 variable1
= TAG_Bool(true);
649 return_label27
: while(false);
650 tracehead
= trace
.prev
;
653 val_t
genericity___MMTypeGeneric___select_property(val_t self
, val_t param0
) {
654 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___select_property
, 264};
659 trace
.prev
= tracehead
; tracehead
= &trace
;
661 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::==*/)))));
662 if (UNTAG_Bool(variable1
)) { /*if*/
663 variable1
= NIT_NULL
/*null*/;
666 variable1
= ATTR_genericity___MMTypeGeneric____props( self
) /*MMTypeGeneric::_props*/;
667 variable1
= ((abstract_collection___Map___has_key_t
)CALL(variable1
,COLOR_abstract_collection___Map___has_key
))(variable1
, variable0
/*g*/) /*Map::has_key*/;
668 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1
)))) { /*if*/
669 variable1
= ATTR_static_type___MMTypeClass____local_class( self
) /*MMTypeGeneric::_local_class*/;
670 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::==*/)))))));
671 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMTypeGeneric___select_property
, 270); nit_exit(1);}
672 variable2
= ATTR_static_type___MMTypeClass____local_class( self
) /*MMTypeGeneric::_local_class*/;
673 variable2
= ((inheritance___MMLocalClass_____bra_t
)CALL(variable2
,COLOR_abstractmetamodel___MMLocalClass_____bra
))(variable2
, variable0
/*g*/) /*MMLocalClass::[]*/;
674 variable1
= variable2
;
675 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::==*/)))))));
676 if (UNTAG_Bool(variable2
)) { /*if*/
677 variable3
= ((genericity___MMLocalProperty___adapt_property_t
)CALL( variable1
/*p*/,COLOR_genericity___MMLocalProperty___adapt_property
))( variable1
/*p*/, self
) /*MMLocalProperty::adapt_property*/;
678 variable2
= variable3
;
679 variable3
= ATTR_genericity___MMTypeGeneric____props( self
) /*MMTypeGeneric::_props*/;
680 ((abstract_collection___Map_____braeq_t
)CALL(variable3
,COLOR_abstract_collection___Map_____braeq
))(variable3
, variable0
/*g*/, variable2
/*p2*/) /*Map::[]=*/;
681 variable1
= variable2
/*p2*/;
684 if (!UNTAG_Bool( TAG_Bool(false))) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMTypeGeneric___select_property
, 277); nit_exit(1);}
687 variable1
= ATTR_genericity___MMTypeGeneric____props( self
) /*MMTypeGeneric::_props*/;
688 variable1
= ((abstract_collection___Map_____bra_t
)CALL(variable1
,COLOR_abstract_collection___Map_____bra
))(variable1
, variable0
/*g*/) /*Map::[]*/;
690 return_label33
: while(false);
691 tracehead
= trace
.prev
;
694 val_t
genericity___MMTypeGeneric___to_s(val_t self
) {
695 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___to_s
, 283};
707 trace
.prev
= tracehead
; tracehead
= &trace
;
708 variable0
= NEW_string___String___init(); /*new String*/
709 variable1
= NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
710 variable2
= variable1
;
711 ((string___String___append_t
)CALL(variable0
,COLOR_abstract_collection___IndexedCollection___append
))(variable0
, variable2
) /*String::append*/;
712 variable3
= ((genericity___MMTypeGeneric___to_s_t
)CALL( self
,COLOR_SUPER_genericity___MMTypeGeneric___to_s
))( self
) /*super MMTypeGeneric::to_s*/;
713 variable4
= variable3
;
714 ((string___String___append_t
)CALL(variable0
,COLOR_abstract_collection___IndexedCollection___append
))(variable0
, variable4
) /*String::append*/;
715 variable5
= NEW_string___String___with_native(BOX_NativeString("["), TAG_Int(1)); /*new String*/
716 variable6
= variable5
;
717 ((string___String___append_t
)CALL(variable0
,COLOR_abstract_collection___IndexedCollection___append
))(variable0
, variable6
) /*String::append*/;
718 variable7
= ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/;
719 variable8
= NEW_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
720 variable7
= ((string___Collection___join_t
)CALL(variable7
,COLOR_string___Collection___join
))(variable7
, variable8
) /*Array::join*/;
721 variable8
= variable7
;
722 ((string___String___append_t
)CALL(variable0
,COLOR_abstract_collection___IndexedCollection___append
))(variable0
, variable8
) /*String::append*/;
723 variable9
= NEW_string___String___with_native(BOX_NativeString("]"), TAG_Int(1)); /*new String*/
724 variable10
= variable9
;
725 ((string___String___append_t
)CALL(variable0
,COLOR_abstract_collection___IndexedCollection___append
))(variable0
, variable10
) /*String::append*/;
727 return_label34
: while(false);
728 tracehead
= trace
.prev
;
731 val_t
genericity___MMTypeGeneric___is_subtype(val_t self
, val_t param0
) {
732 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___is_subtype
, 288};
741 trace
.prev
= tracehead
; tracehead
= &trace
;
743 variable1
= ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/;
744 variable1
= ((array___AbstractArray___length_t
)CALL(variable1
,COLOR_abstract_collection___Collection___length
))(variable1
) /*Array::length*/;
745 variable2
= NEW_range___Range___without_last( TAG_Int(0), variable1
); /*new Range[Int]*/
746 variable1
= variable2
;
747 variable1
= ((range___Range___iterator_t
)CALL(variable1
,COLOR_abstract_collection___Collection___iterator
))(variable1
) /*Range::iterator*/;
748 while (true) { /*for*/
749 variable2
= ((abstract_collection___Iterator___is_ok_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___is_ok
))(variable1
) /*Iterator::is_ok*/;
750 if (!UNTAG_Bool(variable2
)) break; /*for*/
751 variable2
= ((abstract_collection___Iterator___item_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___item
))(variable1
) /*Iterator::item*/;
752 variable3
= ((genericity___MMTypeGeneric___params_t
)CALL( variable0
/*t*/,COLOR_genericity___MMTypeGeneric___params
))( variable0
/*t*/) /*MMTypeGeneric::params*/;
753 variable4
= variable2
/*i*/;
754 variable5
= TAG_Bool(UNTAG_Int( variable4
/*index*/)>=UNTAG_Int( TAG_Int(0)));
755 variable6
= variable5
;
756 if (UNTAG_Bool(variable6
)) { /* and */
757 variable6
= variable3
;
758 variable6
= ATTR_array___AbstractArray____length(variable6
) /*Array::_length*/;
759 variable6
= TAG_Bool(UNTAG_Int( variable4
/*index*/)<UNTAG_Int(variable6
));
761 variable5
= variable6
;
762 if (!UNTAG_Bool(variable5
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
763 variable5
= variable3
;
764 variable5
= ATTR_array___Array____items(variable5
) /*Array::_items*/;
765 variable5
= UNBOX_NativeArray(variable5
)[UNTAG_Int( variable4
/*index*/)];
767 return_label37
: while(false);
768 variable3
= variable5
;
769 variable4
= ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/;
770 variable5
= variable2
/*i*/;
771 variable6
= TAG_Bool(UNTAG_Int( variable5
/*index*/)>=UNTAG_Int( TAG_Int(0)));
772 variable7
= variable6
;
773 if (UNTAG_Bool(variable7
)) { /* and */
774 variable7
= variable4
;
775 variable7
= ATTR_array___AbstractArray____length(variable7
) /*Array::_length*/;
776 variable7
= TAG_Bool(UNTAG_Int( variable5
/*index*/)<UNTAG_Int(variable7
));
778 variable6
= variable7
;
779 if (!UNTAG_Bool(variable6
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
780 variable6
= variable4
;
781 variable6
= ATTR_array___Array____items(variable6
) /*Array::_items*/;
782 variable6
= UNBOX_NativeArray(variable6
)[UNTAG_Int( variable5
/*index*/)];
784 return_label38
: while(false);
785 variable4
= variable6
;
786 variable3
= ((static_type___MMType_____l_t
)CALL(variable3
,COLOR_static_type___MMType_____l
))(variable3
, variable4
) /*MMType::<*/;
787 if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable3
)))) { /*if*/
788 variable1
= TAG_Bool(false);
791 continue_36
: while(0);
792 ((abstract_collection___Iterator___next_t
)CALL(variable1
,COLOR_abstract_collection___Iterator___next
))(variable1
) /*Iterator::next*/;
795 variable1
= TAG_Bool(true);
797 return_label35
: while(false);
798 tracehead
= trace
.prev
;
801 void genericity___MMTypeGeneric___init(val_t self
, val_t param0
, val_t param1
, int* init_table
) {
802 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeGeneric___init
, 301};
805 trace
.prev
= tracehead
; tracehead
= &trace
;
808 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_MMTypeGeneric
].i
]) return;
809 ((static_type___MMTypeClass___init_t
)CALL( self
,COLOR_static_type___MMTypeClass___init
))( self
, variable0
/*c*/, init_table
/*YYY*/) /*MMTypeClass::init*/;
810 ATTR_genericity___MMTypeGeneric____params( self
) /*MMTypeGeneric::_params*/ = variable1
/*p*/;
811 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_MMTypeGeneric
].i
] = 1;
812 tracehead
= trace
.prev
;
815 val_t
genericity___MMTypeFormalParameter___def_class(val_t self
) {
816 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormalParameter___def_class
, 310};
817 trace
.prev
= tracehead
; tracehead
= &trace
;
818 tracehead
= trace
.prev
;
819 return ATTR_genericity___MMTypeFormalParameter____def_class( self
) /*MMTypeFormalParameter::_def_class*/;
821 val_t
genericity___MMTypeFormalParameter___position(val_t self
) {
822 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormalParameter___position
, 313};
823 trace
.prev
= tracehead
; tracehead
= &trace
;
824 tracehead
= trace
.prev
;
825 return ATTR_genericity___MMTypeFormalParameter____position( self
) /*MMTypeFormalParameter::_position*/;
827 val_t
genericity___MMTypeFormalParameter___module(val_t self
) {
828 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormalParameter___module
, 316};
830 trace
.prev
= tracehead
; tracehead
= &trace
;
831 variable0
= ATTR_genericity___MMTypeFormalParameter____def_class( self
) /*MMTypeFormalParameter::_def_class*/;
832 variable0
= ((abstractmetamodel___MMLocalClass___module_t
)CALL(variable0
,COLOR_abstractmetamodel___MMLocalClass___module
))(variable0
) /*MMLocalClass::module*/;
834 return_label40
: while(false);
835 tracehead
= trace
.prev
;
838 val_t
genericity___MMTypeFormalParameter___for_module(val_t self
, val_t param0
) {
839 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormalParameter___for_module
, 318};
844 trace
.prev
= tracehead
; tracehead
= &trace
;
847 variable2
= ((genericity___MMTypeFormalParameter___module_t
)CALL( self
,COLOR_static_type___MMType___module
))( self
) /*MMTypeFormalParameter::module*/;
848 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::==*/)))))));
849 if (UNTAG_Bool(variable2
)) { /*if*/
850 variable2
= ATTR_genericity___MMTypeFormalParameter____def_class( self
) /*MMTypeFormalParameter::_def_class*/;
851 variable2
= ((abstractmetamodel___MMLocalClass___global_t
)CALL(variable2
,COLOR_abstractmetamodel___MMLocalClass___global
))(variable2
) /*MMLocalClass::global*/;
852 variable2
= ((abstractmetamodel___MMModule_____bra_t
)CALL( variable0
/*mod*/,COLOR_abstractmetamodel___MMModule_____bra
))( variable0
/*mod*/, variable2
) /*MMModule::[]*/;
853 variable3
= ((genericity___MMTypeFormalParameter___position_t
)CALL( self
,COLOR_genericity___MMTypeFormalParameter___position
))( self
) /*MMTypeFormalParameter::position*/;
854 variable2
= ((genericity___MMLocalClass___get_formal_t
)CALL(variable2
,COLOR_genericity___MMLocalClass___get_formal
))(variable2
, variable3
) /*MMLocalClass::get_formal*/;
855 variable1
= variable2
/*t=*/;
857 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::==*/)))))));
858 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMTypeFormalParameter___for_module
, 324); nit_exit(1);}
859 variable1
= variable1
/*t*/;
861 return_label41
: while(false);
862 tracehead
= trace
.prev
;
865 val_t
genericity___MMTypeFormalParameter___upcast_for(val_t self
, val_t param0
) {
866 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormalParameter___upcast_for
, 328};
869 trace
.prev
= tracehead
; tracehead
= &trace
;
873 return_label42
: while(false);
874 tracehead
= trace
.prev
;
877 void genericity___MMTypeFormalParameter___bound__eq(val_t self
, val_t param0
) {
878 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormalParameter___bound__eq
, 330};
881 trace
.prev
= tracehead
; tracehead
= &trace
;
883 variable1
= ATTR_type_formal___MMTypeFormal____bound( self
) /*MMTypeFormalParameter::_bound*/;
884 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::==*/)))));
885 if (!UNTAG_Bool(variable1
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMTypeFormalParameter___bound__eq
, 332); nit_exit(1);}
886 ATTR_type_formal___MMTypeFormal____bound( self
) /*MMTypeFormalParameter::_bound*/ = variable0
/*t*/;
887 tracehead
= trace
.prev
;
890 val_t
genericity___MMTypeFormalParameter___adapt_to(val_t self
, val_t param0
) {
891 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormalParameter___adapt_to
, 336};
900 trace
.prev
= tracehead
; tracehead
= &trace
;
902 variable2
= ((genericity___MMTypeFormalParameter___def_class_t
)CALL( self
,COLOR_genericity___MMTypeFormalParameter___def_class
))( self
) /*MMTypeFormalParameter::def_class*/;
903 variable2
= ((static_type___MMType___upcast_for_t
)CALL( variable0
/*r*/,COLOR_static_type___MMType___upcast_for
))( variable0
/*r*/, variable2
) /*MMType::upcast_for*/;
904 variable1
= variable2
;
905 variable2
= TAG_Bool(( variable1
/*old_r*/==NIT_NULL
) || VAL_ISA( variable1
/*old_r*/, COLOR_MMTypeGeneric
, ID_MMTypeGeneric
)) /*cast MMTypeGeneric*/;
906 if (!UNTAG_Bool(variable2
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMTypeFormalParameter___adapt_to
, 340); nit_exit(1);}
907 variable3
= ((genericity___MMTypeGeneric___params_t
)CALL( variable1
/*old_r*/,COLOR_genericity___MMTypeGeneric___params
))( variable1
/*old_r*/) /*MMTypeGeneric::params*/;
908 variable4
= ((genericity___MMTypeFormalParameter___position_t
)CALL( self
,COLOR_genericity___MMTypeFormalParameter___position
))( self
) /*MMTypeFormalParameter::position*/;
909 variable5
= variable4
;
910 variable6
= TAG_Bool(UNTAG_Int( variable5
/*index*/)>=UNTAG_Int( TAG_Int(0)));
911 variable7
= variable6
;
912 if (UNTAG_Bool(variable7
)) { /* and */
913 variable7
= variable3
;
914 variable7
= ATTR_array___AbstractArray____length(variable7
) /*Array::_length*/;
915 variable7
= TAG_Bool(UNTAG_Int( variable5
/*index*/)<UNTAG_Int(variable7
));
917 variable6
= variable7
;
918 if (!UNTAG_Bool(variable6
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", " 'index' ", LOCATE_array___Array_____bra
, 229); nit_exit(1);}
919 variable6
= variable3
;
920 variable6
= ATTR_array___Array____items(variable6
) /*Array::_items*/;
921 variable6
= UNBOX_NativeArray(variable6
)[UNTAG_Int( variable5
/*index*/)];
923 return_label45
: while(false);
924 variable3
= variable6
;
925 variable2
= variable3
;
926 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::==*/)))))));
927 if (!UNTAG_Bool(variable3
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_array___Array_____bra
, 342); nit_exit(1);}
928 variable1
= variable2
/*reduct*/;
930 return_label44
: while(false);
931 tracehead
= trace
.prev
;
934 void genericity___MMTypeFormalParameter___with_bound(val_t self
, val_t param0
, val_t param1
, val_t param2
, val_t param3
, int* init_table
) {
935 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormalParameter___with_bound
, 346};
940 trace
.prev
= tracehead
; tracehead
= &trace
;
945 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_MMTypeFormalParameter
].i
]) return;
946 ((genericity___MMTypeFormalParameter___init_t
)CALL( self
,COLOR_genericity___MMTypeFormalParameter___init
))( self
, variable0
/*n*/, variable1
/*p*/, variable2
/*intro*/, init_table
/*YYY*/) /*MMTypeFormalParameter::init*/;
947 ATTR_type_formal___MMTypeFormal____bound( self
) /*MMTypeFormalParameter::_bound*/ = variable3
/*b*/;
948 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_MMTypeFormalParameter
].i
] = 1;
949 tracehead
= trace
.prev
;
952 void genericity___MMTypeFormalParameter___init(val_t self
, val_t param0
, val_t param1
, val_t param2
, int* init_table
) {
953 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeFormalParameter___init
, 352};
958 trace
.prev
= tracehead
; tracehead
= &trace
;
962 if (init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_MMTypeFormalParameter
].i
]) return;
963 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::==*/)))))));
964 if (!UNTAG_Bool(variable3
)) { fprintf(stderr
, "Assert%s failed (%s: %d)\n", "", LOCATE_genericity___MMTypeFormalParameter___init
, 354); nit_exit(1);}
965 ATTR_type_formal___MMTypeFormal____name( self
) /*MMTypeFormalParameter::_name*/ = variable0
/*n*/;
966 ATTR_genericity___MMTypeFormalParameter____position( self
) /*MMTypeFormalParameter::_position*/ = variable1
/*p*/;
967 ATTR_genericity___MMTypeFormalParameter____def_class( self
) /*MMTypeFormalParameter::_def_class*/ = variable2
/*intro*/;
968 init_table
[VAL2OBJ( self
)->vft
[INIT_TABLE_POS_MMTypeFormalParameter
].i
] = 1;
969 tracehead
= trace
.prev
;
972 val_t
genericity___MMTypeNone___is_generic(val_t self
) {
973 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeNone___is_generic
, 362};
975 trace
.prev
= tracehead
; tracehead
= &trace
;
976 variable0
= TAG_Bool(false);
978 return_label48
: while(false);
979 tracehead
= trace
.prev
;
982 val_t
genericity___MMTypeNone___for_module(val_t self
, val_t param0
) {
983 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeNone___for_module
, 363};
986 trace
.prev
= tracehead
; tracehead
= &trace
;
990 return_label49
: while(false);
991 tracehead
= trace
.prev
;
994 val_t
genericity___MMTypeNone___adapt_to(val_t self
, val_t param0
) {
995 struct trace_t trace
= {NULL
, LOCATE_genericity___MMTypeNone___adapt_to
, 364};
998 trace
.prev
= tracehead
; tracehead
= &trace
;
1001 goto return_label50
;
1002 return_label50
: while(false);
1003 tracehead
= trace
.prev
;