-val_t inheritance___MMLocalClass___inherit_local_property(val_t self, val_t param0) {
- struct trace_t trace = {NULL, NULL, 318, LOCATE_inheritance___MMLocalClass___inherit_local_property};
- val_t variable[24];
- void **closurevariable = NULL;
- trace.prev = tracehead; tracehead = &trace;
- trace.file = LOCATE_inheritance;
- variable[0] = self;
- variable[1] = param0;
- variable[3] = variable[0];
- variable[3] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(variable[3]) /*MMLocalClass::_local_property_by_global*/;
- variable[3] = ((abstract_collection___Map___has_key_t)CALL(variable[3],COLOR_abstract_collection___Map___has_key))(variable[3], variable[1] /*glob*/) /*Map::has_key*/;
- if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable[3])))) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___inherit_local_property, LOCATE_inheritance, 323); nit_exit(1);}
- variable[3] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[1] /*glob*/ == NIT_NULL /*null*/) || (( variable[1] /*glob*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[1] /*glob*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[1] /*glob*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[1] /*glob*/,COLOR_kernel___Object_____eqeq))( variable[1] /*glob*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (!UNTAG_Bool(variable[3])) { fprintf(stderr, "Assert%s failed", ""); fprintf(stderr, " in %s (%s:%d)\n", LOCATE_inheritance___MMLocalClass___inherit_local_property, LOCATE_inheritance, 324); nit_exit(1);}
- /*variable[3] is variable impl*/
- variable[5] = ((abstractmetamodel___MMGlobalProperty___property_hierarchy_t)CALL( variable[1] /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___property_hierarchy))( variable[1] /*glob*/) /*MMGlobalProperty::property_hierarchy*/;
- variable[4] = variable[5];
- variable[6] = variable[0];
- variable[6] = ((abstractmetamodel___MMLocalClass___che_t)CALL(variable[6],COLOR_abstractmetamodel___MMLocalClass___che))(variable[6]) /*MMLocalClass::che*/;
- variable[6] = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable[6],COLOR_partial_order___PartialOrderElement___direct_greaters))(variable[6]) /*PartialOrderElement::direct_greaters*/;
- variable[5] = variable[6];
- variable[6] = ((partial_order___PartialOrder___length_t)CALL( variable[4] /*ghier*/,COLOR_abstract_collection___Collection___length))( variable[4] /*ghier*/) /*PartialOrder::length*/;
- variable[6] = TAG_Bool((variable[6])==( TAG_Int(1)));
- if (UNTAG_Bool(variable[6])) { /*if*/
- variable[6] = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable[1] /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable[1] /*glob*/) /*MMGlobalProperty::intro*/;
- variable[3] = variable[6] /*impl=*/;
- } else { /*if*/
- variable[6] = ((array___AbstractArray___length_t)CALL( variable[5] /*supers*/,COLOR_abstract_collection___Collection___length))( variable[5] /*supers*/) /*AbstractArray::length*/;
- variable[6] = TAG_Bool((variable[6])==( TAG_Int(1)));
- if (UNTAG_Bool(variable[6])) { /*if*/
- variable[6] = ((abstract_collection___IndexedCollection___first_t)CALL( variable[5] /*supers*/,COLOR_abstract_collection___Collection___first))( variable[5] /*supers*/) /*IndexedCollection::first*/;
- variable[6] = ((inheritance___MMLocalClass_____bra_t)CALL(variable[6],COLOR_abstractmetamodel___MMLocalClass_____bra))(variable[6], variable[1] /*glob*/) /*MMLocalClass::[]*/;
- variable[3] = variable[6] /*impl=*/;
- } else { /*if*/
- variable[7] = NEW_ArraySet_array___ArraySet___init(); /*new ArraySet[MMLocalProperty]*/
- variable[6] = variable[7];
- variable[7] = ((array___AbstractArray___iterator_t)CALL( variable[5] /*supers*/,COLOR_abstract_collection___Collection___iterator))( variable[5] /*supers*/) /*AbstractArray::iterator*/;
- while (true) { /*for*/
- variable[8] = ((array___ArrayIterator___is_ok_t)CALL(variable[7],COLOR_abstract_collection___Iterator___is_ok))(variable[7]) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable[8])) break; /*for*/
- variable[8] = ((array___ArrayIterator___item_t)CALL(variable[7],COLOR_abstract_collection___Iterator___item))(variable[7]) /*ArrayIterator::item*/;
- variable[9] = variable[8];
- variable[11] = ((inheritance___MMLocalClass_____bra_t)CALL( variable[9] /*sc*/,COLOR_abstractmetamodel___MMLocalClass_____bra))( variable[9] /*sc*/, variable[1] /*glob*/) /*MMLocalClass::[]*/;
- variable[10] = variable[11];
- variable[11] = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable[10] /*p*/ == NIT_NULL /*null*/) || (( variable[10] /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable[10] /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable[10] /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable[10] /*p*/,COLOR_kernel___Object_____eqeq))( variable[10] /*p*/, NIT_NULL /*null*/) /*Object::==*/)))))));
- if (UNTAG_Bool(variable[11])) { /*if*/
- ((array___ArraySet___add_t)CALL( variable[6] /*impls*/,COLOR_abstract_collection___SimpleCollection___add))( variable[6] /*impls*/, variable[10] /*p*/) /*ArraySet::add*/;
+ void OC_inheritance___MMLocalClass___merge_ancestors_1(struct stack_frame_t *closctx, val_t p0, struct stack_frame_t *closctx_param, fun_t clos_fun0){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ fun_t CREG[1];
+ val_t tmp;
+ /* ./metamodel//inheritance.nit:349 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 0;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___merge_ancestors;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 4;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.closure_ctx = closctx_param;
+ fra.me.closure_funs = CREG;
+ fra.me.REG[0] = p0;
+ CREG[0] = clos_fun0;
+ /* ./metamodel//inheritance.nit:350 */
+ fra.me.REG[1] = CALL_abstract_collection___Collection___iterator(closctx->REG[1])(closctx->REG[1]);
+ /* ./metamodel//inheritance.nit:351 */
+ REGB0 = TAG_Bool(true);
+ /* ./metamodel//inheritance.nit:352 */
+ while(1) {
+ REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = REGB0;
+ } else {
+ REGB2 = TAG_Bool(false);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ /* ./metamodel//inheritance.nit:354 */
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB1 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[0],fra.me.REG[2]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ REGB1 = REGB2;
+ }
+ /* ./metamodel//inheritance.nit:355 */
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB1 = CALL_abstract_collection___Collection___has(closctx->REG[2])(closctx->REG[2], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:356 */
+ fra.me.REG[2] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 356);
+ }
+ fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[3] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
+ REGB1 = CALL_static_type___MMType_____l(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:358 */
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB1 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[0],fra.me.REG[3]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(true);
+ } else {
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB2 = CALL_abstract_collection___Collection___has(closctx->REG[2])(closctx->REG[2], fra.me.REG[3]);
+ REGB1 = REGB2;
+ }
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ if (UNTAG_Bool(REGB1)) {
+ /* ./metamodel//inheritance.nit:359 */
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[1])(fra.me.REG[1]);
+ REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 359);
+ }
+ fra.me.REG[3] = CALL_static_type___MMAncestor___stype(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
+ REGB1 = CALL_static_type___MMType_____l(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ } else {
+ /* ./metamodel//inheritance.nit:358 */
+ REGB2 = TAG_Bool(false);
+ REGB1 = REGB2;
+ }
+ if (UNTAG_Bool(REGB1)) {
+ /* ./metamodel//inheritance.nit:360 */
+ CALL_abstract_collection___SimpleCollection___add(closctx->REG[2])(closctx->REG[2], fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:361 */
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ }
+ /* ./metamodel//inheritance.nit:363 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[1])(fra.me.REG[1]);
+ } else {
+ /* ./metamodel//inheritance.nit:352 */
+ goto label2;
+ }
+ }
+ label2: while(0);
+ /* ./metamodel//inheritance.nit:365 */
+ REGB0 = CALL_abstract_collection___Collection___has(closctx->REG[2])(closctx->REG[2], fra.me.REG[0]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:366 */
+ CALL_abstract_collection___SimpleCollection___add(closctx->REG[3])(closctx->REG[3], fra.me.REG[0]);
+ }
+ stack_frame_head = fra.me.prev;
+ return;
+ }
+val_t inheritance___MMLocalClass___inherit_local_property(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[8];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ static val_t once_value_2; /* Once value */
+ static val_t once_value_3; /* Once value */
+ static val_t once_value_4; /* Once value */
+ static val_t once_value_5; /* Once value */
+ static val_t once_value_6; /* Once value */
+ static val_t once_value_7; /* Once value */
+ static val_t once_value_8; /* Once value */
+ static val_t once_value_10; /* Once value */
+ static val_t once_value_11; /* Once value */
+ static val_t once_value_12; /* Once value */
+ static val_t once_value_13; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 377;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___inherit_local_property;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 9;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[3] = NIT_NULL;
+ fra.me.REG[4] = NIT_NULL;
+ fra.me.REG[5] = NIT_NULL;
+ fra.me.REG[6] = NIT_NULL;
+ fra.me.REG[7] = NIT_NULL;
+ fra.me.REG[8] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:382 */
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_local_property_by_global", LOCATE_inheritance, 382);
+ }
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
+ REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 382);
+ }
+ /* ./metamodel//inheritance.nit:386 */
+ fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:387 */
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:388 */
+ REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[2])(fra.me.REG[2]);
+ REGB1 = TAG_Int(1);
+ REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:207 */
+ REGB1 = TAG_Bool((REGB0)==(REGB1));
+ /* ./metamodel//inheritance.nit:388 */
+ REGB2 = REGB1;
+ }
+ if (UNTAG_Bool(REGB2)) {
+ /* ./metamodel//inheritance.nit:390 */
+ fra.me.REG[4] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
+ } else {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:391 */
+ REGB1 = TAG_Int(1);
+ REGB0 = TAG_Bool(IS_EQUAL_OO(REGB2,REGB1));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:207 */
+ REGB1 = TAG_Bool((REGB2)==(REGB1));
+ /* ./metamodel//inheritance.nit:391 */
+ REGB0 = REGB1;
+ }
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:393 */
+ fra.me.REG[5] = CALL_abstract_collection___Collection___first(fra.me.REG[3])(fra.me.REG[3]);
+ REGB0 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 393);
+ }
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1]);
+ fra.me.REG[4] = fra.me.REG[5];
+ } else {
+ /* ./metamodel//inheritance.nit:397 */
+ fra.me.REG[5] = NEW_ArraySet_array___ArraySet___init();
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB0 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[6] = ATTR_array___Array____items(fra.me.REG[3]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)<UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB1 = TAG_Bool(fra.me.REG[6]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[7] = ((Nit_NativeArray)fra.me.REG[6])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:399 */
+ REGB1 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[1]);
+ if (UNTAG_Bool(REGB1)) {
+ fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[1]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[7]);
+ }
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB0)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB0 = REGB1;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label1;