/* This C file is generated by NIT to compile module inheritance. */
#include "inheritance._sep.h"
-val_t inheritance___MMModule___type_any(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMModule::type_any (src/metamodel//inheritance.nit:24,2--28:24)"};
- val_t variable0;
- val_t variable1;
- static val_t once_value_variable1_1; static int once_bool_variable1_1;
- trace.prev = tracehead; tracehead = &trace;
- if (once_bool_variable1_1) variable1 = once_value_variable1_1;
- else {
- variable1 = NEW_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)); /*new String*/
- variable1 = ((symbol___String___to_symbol_t)CALL(variable1,COLOR_symbol___String___to_symbol))(variable1) /*String::to_symbol*/;
- once_value_variable1_1 = variable1;
- once_bool_variable1_1 = true;
- }
- variable1 = ((abstractmetamodel___MMModule___class_by_name_t)CALL( self,COLOR_abstractmetamodel___MMModule___class_by_name))( self, variable1) /*MMModule::class_by_name*/;
- variable0 = variable1;
- variable1 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*c_name*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*c_name*/) /*MMLocalClass::get_type*/;
- variable0 = variable1;
- goto return_label0;
- return_label0: while(false);
- tracehead = trace.prev;
- return variable0;
+val_t inheritance___MMModule___type_any(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 24;
+ fra.me.meth = LOCATE_inheritance___MMModule___type_any;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:27 */
+ if (!once_value_1) {
+ if (!once_value_2) {
+ fra.me.REG[1] = BOX_NativeString("Object");
+ REGB0 = TAG_Int(6);
+ fra.me.REG[1] = NEW_String_string___String___with_native(fra.me.REG[1], REGB0);
+ once_value_2 = fra.me.REG[1];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[1] = once_value_2;
+ fra.me.REG[1] = fra.me.REG[1];
+ fra.me.REG[1] = CALL_symbol___String___to_symbol(fra.me.REG[1])(fra.me.REG[1]);
+ once_value_1 = fra.me.REG[1];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[1] = once_value_1;
+ fra.me.REG[1] = fra.me.REG[1];
+ fra.me.REG[1] = CALL_abstractmetamodel___MMModule___class_by_name(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:28 */
+ fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
+ goto label3;
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
}
-void inheritance___MMModule___import_global_classes(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMModule::import_global_classes (src/metamodel//inheritance.nit:31,2--40:43)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- trace.prev = tracehead; tracehead = &trace;
- variable1 = NEW_hash___HashMap___init(); /*new HashMap[MMGlobalClass, HashSet[MMLocalClass]]*/
- variable0 = variable1;
- variable1 = ((abstractmetamodel___MMModule___mhe_t)CALL( self,COLOR_abstractmetamodel___MMModule___mhe))( self) /*MMModule::mhe*/;
- variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:35,3--20\n"); nit_exit(1);}
- variable1 = ((abstractmetamodel___MMModule___mhe_t)CALL( self,COLOR_abstractmetamodel___MMModule___mhe))( self) /*MMModule::mhe*/;
- variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable1,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable1) /*PartialOrderElement::direct_greaters*/;
- variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
- while (true) { /*for*/
- variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
- variable3 = ((abstractmetamodel___MMModule___global_classes_t)CALL( variable2 /*mod*/,COLOR_abstractmetamodel___MMModule___global_classes))( variable2 /*mod*/) /*MMModule::global_classes*/;
- variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*Array::iterator*/;
- while (true) { /*for*/
- variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable4)) break; /*for*/
- variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
- variable5 = ((abstractmetamodel___MMModule___global_classes_t)CALL( self,COLOR_abstractmetamodel___MMModule___global_classes))( self) /*MMModule::global_classes*/;
- variable5 = ((array___AbstractArray___has_t)CALL(variable5,COLOR_abstract_collection___Collection___has))(variable5, variable4 /*glob*/) /*Array::has*/;
- if (UNTAG_Bool(variable5)) { /*if*/
- goto continue_4;
+void inheritance___MMModule___import_global_classes(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 31;
+ fra.me.meth = LOCATE_inheritance___MMModule___import_global_classes;
+ 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.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:34 */
+ fra.me.REG[1] = NEW_HashMap_hash_collection___HashMap___init();
+ /* ./metamodel//inheritance.nit:35 */
+ fra.me.REG[1] = CALL_abstractmetamodel___MMModule___mhe(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 35);
+ }
+ /* ./metamodel//inheritance.nit:36 */
+ fra.me.REG[1] = CALL_abstractmetamodel___MMModule___mhe(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 36);
+ }
+ fra.me.REG[1] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./../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[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[1]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../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[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
}
- variable5 = ATTR_abstractmetamodel___MMModule____global_classes( self) /*MMModule::_global_classes*/;
- ((array___AbstractArray___add_t)CALL(variable5,COLOR_abstract_collection___SimpleCollection___add))(variable5, variable4 /*glob*/) /*Array::add*/;
- variable5 = ATTR_abstractmetamodel___MMModule____global_class_by_name( self) /*MMModule::_global_class_by_name*/;
- variable6 = ((abstractmetamodel___MMGlobalClass___name_t)CALL( variable4 /*glob*/,COLOR_abstractmetamodel___MMGlobalClass___name))( variable4 /*glob*/) /*MMGlobalClass::name*/;
- ((abstract_collection___Map_____braeq_t)CALL(variable5,COLOR_abstract_collection___Map_____braeq))(variable5, variable6, variable4 /*glob*/) /*Map::[]=*/;
- continue_4: while(0);
- ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:37 */
+ fra.me.REG[3] = CALL_abstractmetamodel___MMModule___global_classes(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[3])(fra.me.REG[3], (&(fra.me)), ((fun_t)OC_inheritance___MMModule___import_global_classes_1));
+ /* ./../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 label3;
}
- break_4: while(0);
- continue_3: while(0);
- ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
}
- break_3: while(0);
- tracehead = trace.prev;
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void inheritance___MMModule___import_local_classes(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMModule::import_local_classes (src/metamodel//inheritance.nit:46,2--51:46)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_abstractmetamodel___MMModule____global_classes( self) /*MMModule::_global_classes*/;
- variable0 = ((array___AbstractArray___iterator_t)CALL(variable0,COLOR_abstract_collection___Collection___iterator))(variable0) /*Array::iterator*/;
- while (true) { /*for*/
- variable1 = ((array___ArrayIterator___is_ok_t)CALL(variable0,COLOR_abstract_collection___Iterator___is_ok))(variable0) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable1)) break; /*for*/
- variable1 = ((array___ArrayIterator___item_t)CALL(variable0,COLOR_abstract_collection___Iterator___item))(variable0) /*ArrayIterator::item*/;
- variable2 = ((abstractmetamodel___MMModule_____bra_t)CALL( self,COLOR_abstractmetamodel___MMModule_____bra))( self, variable1 /*g*/) /*MMModule::[]*/;
- variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*MMLocalClass::==*/)))))));
- if (UNTAG_Bool(variable2)) { /*if*/
- goto continue_6;
- }
- variable3 = NEW_inheritance___MMImplicitLocalClass___init( self, variable1 /*g*/); /*new MMImplicitLocalClass*/
- variable2 = variable3;
- continue_6: while(0);
- ((array___ArrayIterator___next_t)CALL(variable0,COLOR_abstract_collection___Iterator___next))(variable0) /*ArrayIterator::next*/;
+ void OC_inheritance___MMModule___import_global_classes_1(struct stack_frame_t *closctx, val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ 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___MMModule___import_global_classes;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:38 */
+ fra.me.REG[1] = CALL_abstractmetamodel___MMModule___global_classes(closctx->REG[0])(closctx->REG[0]);
+ REGB0 = CALL_abstract_collection___Collection___has(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ goto label2;
+ }
+ /* ./metamodel//inheritance.nit:39 */
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____global_classes(closctx->REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_global_classes", LOCATE_inheritance, 39);
+ }
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMModule____global_classes(closctx->REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:40 */
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____global_class_by_name(closctx->REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_global_class_by_name", LOCATE_inheritance, 40);
+ }
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMModule____global_class_by_name(closctx->REG[0]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2], fra.me.REG[0]);
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return;
+ }
+void inheritance___MMModule___import_local_classes(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 46;
+ fra.me.meth = LOCATE_inheritance___MMModule___import_local_classes;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:49 */
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____global_classes(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_global_classes", LOCATE_inheritance, 49);
}
- break_6: while(0);
- tracehead = trace.prev;
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMModule____global_classes(fra.me.REG[0]);
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[1])(fra.me.REG[1], (&(fra.me)), ((fun_t)OC_inheritance___MMModule___import_local_classes_1));
+ stack_frame_head = fra.me.prev;
return;
}
-void inheritance___MMLocalClass___compute_super_classes(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::compute_super_classes (src/metamodel//inheritance.nit:64,2--87:26)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ((inheritance___MMLocalClass___computed_super_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___computed_super_classes))( self) /*MMLocalClass::computed_super_classes*/;
- if (UNTAG_Bool(variable0)) { /*if*/
- goto return_label7;
- } else { /*if*/
- variable0 = ATTR_inheritance___MMLocalClass____computing_super( self) /*MMLocalClass::_computing_super*/;
- if (UNTAG_Bool(variable0)) { /*if*/
- variable0 = ((file___Object___stderr_t)CALL( self,COLOR_file___Object___stderr))( self) /*MMLocalClass::stderr*/;
- variable1 = NEW_string___String___init(); /*new String*/
- variable2 = NEW_string___String___with_native(BOX_NativeString("Fatal error: Inheritance loop for class "), TAG_Int(40)); /*new String*/
- variable3 = variable2;
- ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable3) /*String::append*/;
- variable4 = self;
- variable4 = ((string___String___to_s_t)CALL(variable4,COLOR_string___Object___to_s))(variable4) /*String::to_s*/;
- ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable4) /*String::append*/;
- variable5 = NEW_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
- variable6 = variable5;
- ((string___String___append_t)CALL(variable1,COLOR_abstract_collection___IndexedCollection___append))(variable1, variable6) /*String::append*/;
- ((file___OFStream___write_t)CALL(variable0,COLOR_stream___OStream___write))(variable0, variable1) /*OFStream::write*/;
- exit(UNTAG_Int( TAG_Int(1)));
+ void OC_inheritance___MMModule___import_local_classes_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[1];} fra;
+ val_t REGB0;
+ fun_t CREG[1];
+ val_t tmp;
+ 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___MMModule___import_local_classes;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = 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:50 */
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMModule____local_class_by_global(closctx->REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_local_class_by_global", LOCATE_inheritance, 50);
+ }
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMModule____local_class_by_global(closctx->REG[0]);
+ REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ goto label2;
}
+ /* ./metamodel//inheritance.nit:51 */
+ fra.me.REG[0] = NEW_MMImplicitLocalClass_inheritance___MMImplicitLocalClass___init(closctx->REG[0], fra.me.REG[0]);
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return;
+ }
+void inheritance___MMLocalClass___compute_super_classes(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ static val_t once_value_2; /* Once value */
+ static val_t once_value_3; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 64;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_super_classes;
+ 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.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:67 */
+ REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:69 */
+ goto label1;
+ } else {
+ /* ./metamodel//inheritance.nit:70 */
+ REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_computing_super", LOCATE_inheritance, 70);
+ }
+ REGB0 = ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:71 */
+ fra.me.REG[1] = CALL_file___Object___stderr(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB0);
+ if (!once_value_2) {
+ fra.me.REG[3] = BOX_NativeString("Fatal error: Inheritance loop for class ");
+ REGB0 = TAG_Int(40);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_2 = fra.me.REG[3];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[3] = once_value_2;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[3] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ if (!once_value_3) {
+ fra.me.REG[3] = BOX_NativeString("\n");
+ REGB0 = TAG_Int(1);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_3 = fra.me.REG[3];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[3] = once_value_3;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_stream___OStream___write(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:72 */
+ REGB0 = TAG_Int(1);
+ CALL_kernel___Object___exit(fra.me.REG[0])(fra.me.REG[0], REGB0);
+ }
+ }
+ /* ./metamodel//inheritance.nit:74 */
+ REGB0 = TAG_Bool(true);
+ ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0]) = REGB0;
+ /* ./metamodel//inheritance.nit:76 */
+ fra.me.REG[2] = NEW_Array_array___Array___init();
+ /* ./metamodel//inheritance.nit:77 */
+ CALL_inheritance___MMLocalClass___add_explicit_classes(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:78 */
+ CALL_inheritance___MMLocalClass___add_super_classes(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:79 */
+ CALL_inheritance___MMLocalClass___add_default_any_class(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:80 */
+ CALL_inheritance___MMLocalClass___compute_super_parents(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:81 */
+ fra.me.REG[1] = NEW_HashSet_hash_collection___HashSet___init();
+ /* ./metamodel//inheritance.nit:82 */
+ CALL_abstract_collection___SimpleCollection___add_all(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:83 */
+ fra.me.REG[1] = CALL_array___Collection___to_a(fra.me.REG[1])(fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:84 */
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___mmmodule(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstractmetamodel___MMModule___set_supers_class(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[0], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:85 */
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 85);
+ }
+ /* ./metamodel//inheritance.nit:86 */
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____cshe(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 86);
+ }
+ /* ./metamodel//inheritance.nit:87 */
+ REGB0 = TAG_Bool(false);
+ ATTR_inheritance___MMLocalClass____computing_super(fra.me.REG[0]) = REGB0;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return;
+}
+void inheritance___MMLocalClass___compute_ancestors(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 90;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_ancestors;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:93 */
+ REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 93);
+ }
+ /* ./metamodel//inheritance.nit:94 */
+ REGB0 = CALL_inheritance___MMLocalClass___computed_ancestors(fra.me.REG[0])(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ goto label1;
}
- ATTR_inheritance___MMLocalClass____computing_super( self) /*MMLocalClass::_computing_super*/ = TAG_Bool(true);
- variable1 = NEW_array___Array___init(); /*new Array[MMLocalClass]*/
- variable0 = variable1;
- ((inheritance___MMLocalClass___add_explicit_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___add_explicit_classes))( self, variable0 /*supers*/) /*MMLocalClass::add_explicit_classes*/;
- ((inheritance___MMLocalClass___add_super_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___add_super_classes))( self, variable0 /*supers*/) /*MMLocalClass::add_super_classes*/;
- ((inheritance___MMLocalClass___add_default_any_class_t)CALL( self,COLOR_inheritance___MMLocalClass___add_default_any_class))( self, variable0 /*supers*/) /*MMLocalClass::add_default_any_class*/;
- ((inheritance___MMLocalClass___compute_super_parents_t)CALL( self,COLOR_inheritance___MMLocalClass___compute_super_parents))( self, variable0 /*supers*/) /*MMLocalClass::compute_super_parents*/;
- variable2 = NEW_hash___HashSet___init(); /*new HashSet[MMLocalClass]*/
- variable1 = variable2;
- ((abstract_collection___SimpleCollection___add_all_t)CALL( variable1 /*set*/,COLOR_abstract_collection___SimpleCollection___add_all))( variable1 /*set*/, variable0 /*supers*/) /*HashSet::add_all*/;
- variable3 = ((array___Collection___to_a_t)CALL( variable1 /*set*/,COLOR_array___Collection___to_a))( variable1 /*set*/) /*HashSet::to_a*/;
- variable2 = variable3;
- variable3 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
- ((abstractmetamodel___MMModule___set_supers_class_t)CALL(variable3,COLOR_abstractmetamodel___MMModule___set_supers_class))(variable3, self, variable2 /*u*/) /*MMModule::set_supers_class*/;
- variable3 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
- variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == NIT_NULL /*null*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
- if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:85,3--22\n"); nit_exit(1);}
- variable3 = ATTR_abstractmetamodel___MMLocalClass____cshe( self) /*MMLocalClass::_cshe*/;
- variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == NIT_NULL /*null*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
- if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:86,3--22\n"); nit_exit(1);}
- ATTR_inheritance___MMLocalClass____computing_super( self) /*MMLocalClass::_computing_super*/ = TAG_Bool(false);
- return_label7: while(false);
- tracehead = trace.prev;
+ /* ./metamodel//inheritance.nit:96 */
+ fra.me.REG[1] = CALL_inheritance___MMLocalClass___build_ancestors(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_inheritance___MMLocalClass___group_ancestors(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:97 */
+ fra.me.REG[2] = NEW_HashMap_hash_collection___HashMap___init();
+ ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]) = fra.me.REG[2];
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[1])(fra.me.REG[1], (&(fra.me)), ((fun_t)OC_inheritance___MMLocalClass___compute_ancestors_2));
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void inheritance___MMLocalClass___compute_ancestors(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::compute_ancestors (src/metamodel//inheritance.nit:90,2--104:36)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ((inheritance___MMLocalClass___computed_super_classes_t)CALL( self,COLOR_inheritance___MMLocalClass___computed_super_classes))( self) /*MMLocalClass::computed_super_classes*/;
- if (!UNTAG_Bool(variable0)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:93,3--31\n"); nit_exit(1);}
- variable0 = ((inheritance___MMLocalClass___computed_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___computed_ancestors))( self) /*MMLocalClass::computed_ancestors*/;
- if (UNTAG_Bool(variable0)) { /*if*/
- goto return_label8;
- }
- variable1 = ((inheritance___MMLocalClass___build_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___build_ancestors))( self) /*MMLocalClass::build_ancestors*/;
- variable1 = ((inheritance___MMLocalClass___group_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___group_ancestors))( self, variable1) /*MMLocalClass::group_ancestors*/;
- variable0 = variable1;
- variable1 = NEW_hash___HashMap___init(); /*new HashMap[MMLocalClass, MMAncestor]*/
- ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/ = variable1;
- variable1 = ((abstract_collection___Map___iterator_t)CALL( variable0 /*ancestors*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*ancestors*/) /*Map::iterator*/;
- while (true) { /*for*/
- variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*MapIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*MapIterator::item*/;
- variable3 = ((abstract_collection___Collection___length_t)CALL( variable2 /*set*/,COLOR_abstract_collection___Collection___length))( variable2 /*set*/) /*Set::length*/;
- variable3 = TAG_Bool((variable3)==( TAG_Int(1)));
- if (UNTAG_Bool(variable3)) { /*if*/
- variable3 = ((abstract_collection___Collection___first_t)CALL( variable2 /*set*/,COLOR_abstract_collection___Collection___first))( variable2 /*set*/) /*Set::first*/;
- ((static_type___MMLocalClass___add_ancestor_t)CALL( self,COLOR_static_type___MMLocalClass___add_ancestor))( self, variable3) /*MMLocalClass::add_ancestor*/;
- } else { /*if*/
- variable4 = ((inheritance___MMLocalClass___merge_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___merge_ancestors))( self, variable2 /*set*/) /*MMLocalClass::merge_ancestors*/;
- variable3 = variable4;
- variable4 = ((inheritance___MMLocalClass___merge_ancestors_t)CALL( self,COLOR_inheritance___MMLocalClass___merge_ancestors))( self, variable2 /*set*/) /*MMLocalClass::merge_ancestors*/;
- ((static_type___MMLocalClass___add_ancestor_t)CALL( self,COLOR_static_type___MMLocalClass___add_ancestor))( self, variable4) /*MMLocalClass::add_ancestor*/;
+ void OC_inheritance___MMLocalClass___compute_ancestors_2(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[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ fun_t CREG[1];
+ val_t tmp;
+ /* ./metamodel//inheritance.nit:99 */
+ 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___compute_ancestors;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = 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:100 */
+ REGB0 = CALL_abstract_collection___Collection___length(fra.me.REG[0])(fra.me.REG[0]);
+ 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:100 */
+ REGB2 = REGB1;
}
- continue_9: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*MapIterator::next*/;
+ if (UNTAG_Bool(REGB2)) {
+ /* ./metamodel//inheritance.nit:101 */
+ fra.me.REG[1] = CALL_abstract_collection___Collection___first(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_static_type___MMLocalClass___add_ancestor(closctx->REG[0])(closctx->REG[0], fra.me.REG[1]);
+ } else {
+ /* ./metamodel//inheritance.nit:103 */
+ fra.me.REG[1] = CALL_inheritance___MMLocalClass___merge_ancestors(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:104 */
+ fra.me.REG[0] = CALL_inheritance___MMLocalClass___merge_ancestors(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
+ CALL_static_type___MMLocalClass___add_ancestor(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
+ }
+ stack_frame_head = fra.me.prev;
+ return;
+ }
+void inheritance___MMLocalClass___inherit_global_properties(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 111;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___inherit_global_properties;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ /* ./metamodel//inheritance.nit:114 */
+ REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_are_global_properties_inherited", LOCATE_inheritance, 114);
+ }
+ REGB0 = ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ goto label1;
+ }
+ /* ./metamodel//inheritance.nit:115 */
+ REGB0 = TAG_Bool(true);
+ ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0]) = REGB0;
+ /* ./metamodel//inheritance.nit:117 */
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 117);
}
- break_9: while(0);
- return_label8: while(false);
- tracehead = trace.prev;
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:118 */
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 118);
+ }
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:119 */
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../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[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../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[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:120 */
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___global_properties(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[4])(fra.me.REG[4], (&(fra.me)), ((fun_t)OC_inheritance___MMLocalClass___inherit_global_properties_2));
+ /* ./../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 label4;
+ }
+ }
+ label4: while(0);
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void inheritance___MMLocalClass___inherit_global_properties(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::inherit_global_properties (src/metamodel//inheritance.nit:109,2--141:21)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/;
- variable0 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*Set::==*/)))))));
- if (UNTAG_Bool(variable0)) { /*if*/
- goto return_label10;
- }
- variable0 = NEW_hash___HashSet___init(); /*new HashSet[MMGlobalProperty]*/
- ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/ = variable0;
- variable0 = NEW_hash___HashMap___init(); /*new HashMap[Symbol, Array[MMGlobalProperty]]*/
- ATTR_abstractmetamodel___MMLocalClass____properties_by_name( self) /*MMLocalClass::_properties_by_name*/ = variable0;
- variable0 = NEW_hash___HashMap___init(); /*new HashMap[MMGlobalProperty, MMLocalProperty]*/
- ATTR_abstractmetamodel___MMLocalClass____local_property_by_global( self) /*MMLocalClass::_local_property_by_global*/ = variable0;
- variable1 = ATTR_abstractmetamodel___MMLocalClass____properties_by_name( self) /*MMLocalClass::_properties_by_name*/;
- variable0 = variable1;
- variable2 = ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/;
- variable1 = variable2;
- variable2 = ((abstractmetamodel___MMLocalClass___che_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___che))( self) /*MMLocalClass::che*/;
- variable2 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable2,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable2) /*PartialOrderElement::direct_greaters*/;
- variable2 = ((array___AbstractArray___iterator_t)CALL(variable2,COLOR_abstract_collection___Collection___iterator))(variable2) /*Array::iterator*/;
- while (true) { /*for*/
- variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable3)) break; /*for*/
- variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
- variable4 = ((abstractmetamodel___MMLocalClass___global_properties_t)CALL( variable3 /*c*/,COLOR_abstractmetamodel___MMLocalClass___global_properties))( variable3 /*c*/) /*MMLocalClass::global_properties*/;
- variable4 = ((abstract_collection___Collection___iterator_t)CALL(variable4,COLOR_abstract_collection___Collection___iterator))(variable4) /*Set::iterator*/;
- while (true) { /*for*/
- variable5 = ((abstract_collection___Iterator___is_ok_t)CALL(variable4,COLOR_abstract_collection___Iterator___is_ok))(variable4) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable5)) break; /*for*/
- variable5 = ((abstract_collection___Iterator___item_t)CALL(variable4,COLOR_abstract_collection___Iterator___item))(variable4) /*Iterator::item*/;
- variable6 = ((abstract_collection___Collection___has_t)CALL( variable1 /*set*/,COLOR_abstract_collection___Collection___has))( variable1 /*set*/, variable5 /*glob*/) /*Set::has*/;
- if (UNTAG_Bool(variable6)) { /*if*/
- goto continue_12;
+ void OC_inheritance___MMLocalClass___inherit_global_properties_2(struct stack_frame_t *closctx, val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ 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___inherit_global_properties;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:121 */
+ REGB0 = CALL_abstract_collection___Collection___has(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ goto label3;
+ }
+ /* ./metamodel//inheritance.nit:123 */
+ CALL_abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:127 */
+ REGB0 = CALL_abstractmetamodel___MMGlobalProperty___is_init(fra.me.REG[0])(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[1] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[1] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___global(closctx->REG[0])(closctx->REG[0]);
+ REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[1],fra.me.REG[2]));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ REGB0 = REGB1;
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ } else {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ }
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:129 */
+ goto label3;
+ }
+ /* ./metamodel//inheritance.nit:133 */
+ fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___name(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ REGB0 = TAG_Int(0);
+ REGB0 = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], REGB0);
+ REGB1 = TAG_Char('@');
+ REGB2 = TAG_Bool(IS_EQUAL_OO(REGB0,REGB1));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:347 */
+ REGB1 = TAG_Bool((REGB0)==(REGB1));
+ /* ./metamodel//inheritance.nit:133 */
+ REGB2 = REGB1;
+ }
+ if (UNTAG_Bool(REGB2)) {
+ goto label3;
+ }
+ /* ./metamodel//inheritance.nit:135 */
+ CALL_inheritance___MMLocalClass___make_visible_an_inherited_global_property(closctx->REG[0])(closctx->REG[0], fra.me.REG[0]);
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return;
+ }
+val_t inheritance___MMLocalClass___global_properties(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 140;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___global_properties;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:142 */
+ REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_are_global_properties_inherited", LOCATE_inheritance, 142);
+ }
+ REGB0 = ATTR_inheritance___MMLocalClass____are_global_properties_inherited(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 142);
+ }
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
+ goto label1;
+ }
+ /* ./metamodel//inheritance.nit:143 */
+ REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 143);
+ }
+ /* ./metamodel//inheritance.nit:144 */
+ CALL_inheritance___MMLocalClass___inherit_global_properties(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:145 */
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 145);
+ }
+ fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
+ fra.me.REG[1] = fra.me.REG[0];
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
+}
+val_t inheritance___MMLocalClass___has_global_property(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 148;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___has_global_property;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:152 */
+ REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(false);
+ goto label1;
+ }
+ /* ./metamodel//inheritance.nit:154 */
+ REGB1 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 154);
+ }
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:155 */
+ REGB1 = CALL_abstract_collection___Collection___has(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(true);
+ REGB0 = REGB1;
+ goto label1;
+ }
+ /* ./metamodel//inheritance.nit:156 */
+ fra.me.REG[0] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB1 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB2 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
}
- ((abstract_collection___SimpleCollection___add_t)CALL( variable1 /*set*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*set*/, variable5 /*glob*/) /*Set::add*/;
- variable6 = ((abstractmetamodel___MMGlobalProperty___is_init_t)CALL( variable5 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___is_init))( variable5 /*glob*/) /*MMGlobalProperty::is_init*/;
- variable7 = variable6;
- if (UNTAG_Bool(variable7)) { /* and */
- variable7 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable5 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable5 /*glob*/) /*MMGlobalProperty::intro*/;
- variable7 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL(variable7,COLOR_abstractmetamodel___MMLocalProperty___local_class))(variable7) /*MMConcreteProperty::local_class*/;
- variable7 = ((abstractmetamodel___MMLocalClass___global_t)CALL(variable7,COLOR_abstractmetamodel___MMLocalClass___global))(variable7) /*MMLocalClass::global*/;
- variable8 = ((abstractmetamodel___MMLocalClass___global_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___global))( self) /*MMLocalClass::global*/;
- variable7 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable7 == variable8) || ((variable7 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable7,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))(variable7, variable8) /*MMGlobalClass::==*/)))))));
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB1)];
+ /* ./metamodel//inheritance.nit:157 */
+ REGB2 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
+ if (UNTAG_Bool(REGB2)) {
+ /* ./metamodel//inheritance.nit:158 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:159 */
+ REGB2 = TAG_Bool(true);
+ REGB0 = REGB2;
+ goto label1;
}
- variable6 = variable7;
- if (UNTAG_Bool(variable6)) { /*if*/
- goto continue_12;
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = REGB2;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label2;
+ }
+ }
+ label2: while(0);
+ /* ./metamodel//inheritance.nit:162 */
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+val_t inheritance___MMLocalClass___has_global_property_by_name(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 REGB3;
+ val_t REGB4;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 165;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___has_global_property_by_name;
+ 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:169 */
+ REGB0 = CALL_inheritance___MMLocalClass___computed_super_classes(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ REGB0 = TAG_Bool(false);
+ goto label1;
+ }
+ /* ./metamodel//inheritance.nit:172 */
+ CALL_inheritance___MMLocalClass___compute_super_classes(fra.me.REG[0])(fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:174 */
+ REGB1 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 174);
+ }
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
+ REGB1 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ if (UNTAG_Bool(REGB1)) {
+ /* ./metamodel//inheritance.nit:175 */
+ REGB1 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 175);
+ }
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], 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, 175);
+ }
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:175 */
+ REGB2 = TAG_Int(1);
+ REGB3 = TAG_Bool(IS_EQUAL_OO(REGB1,REGB2));
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:207 */
+ REGB2 = TAG_Bool((REGB1)==(REGB2));
+ /* ./metamodel//inheritance.nit:175 */
+ REGB3 = REGB2;
+ }
+ REGB0 = REGB3;
+ goto label1;
+ }
+ /* ./metamodel//inheritance.nit:177 */
+ REGB3 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_global_properties", LOCATE_inheritance, 177);
+ }
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____global_properties(fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:179 */
+ REGB3 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 179);
+ }
+ fra.me.REG[3] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
+ REGB3 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
+ if (UNTAG_Bool(REGB3)) {
+ /* ./metamodel//inheritance.nit:180 */
+ REGB3 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 180);
+ }
+ fra.me.REG[3] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
+ } else {
+ /* ./metamodel//inheritance.nit:182 */
+ fra.me.REG[4] = NEW_Array_array___Array___init();
+ fra.me.REG[3] = fra.me.REG[4];
+ /* ./metamodel//inheritance.nit:183 */
+ REGB3 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 183);
+ }
+ fra.me.REG[4] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1], fra.me.REG[3]);
+ }
+ /* ./metamodel//inheritance.nit:185 */
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB3 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[5] = ATTR_array___Array____items(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB3)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB2 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
}
- variable7 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable5 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable5 /*glob*/) /*MMGlobalProperty::intro*/;
- variable7 = ((abstractmetamodel___MMLocalProperty___name_t)CALL(variable7,COLOR_abstractmetamodel___MMLocalProperty___name))(variable7) /*MMConcreteProperty::name*/;
- variable6 = variable7;
- variable7 = NIT_NULL /*decl variable conf_set*/;
- variable8 = ((abstract_collection___Map___has_key_t)CALL( variable0 /*names*/,COLOR_abstract_collection___Map___has_key))( variable0 /*names*/, variable6 /*gname*/) /*Map::has_key*/;
- if (UNTAG_Bool(variable8)) { /*if*/
- variable8 = ((abstract_collection___Map_____bra_t)CALL( variable0 /*names*/,COLOR_abstract_collection___Map_____bra))( variable0 /*names*/, variable6 /*gname*/) /*Map::[]*/;
- variable7 = variable8 /*conf_set=*/;
- } else { /*if*/
- variable8 = NEW_array___Array___init(); /*new Array[MMGlobalProperty]*/
- variable7 = variable8 /*conf_set=*/;
- ((abstract_collection___Map_____braeq_t)CALL( variable0 /*names*/,COLOR_abstract_collection___Map_____braeq))( variable0 /*names*/, variable6 /*gname*/, variable7 /*conf_set*/) /*Map::[]=*/;
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[6] = ((Nit_NativeArray)fra.me.REG[5])->val[UNTAG_Int(REGB3)];
+ /* ./metamodel//inheritance.nit:186 */
+ REGB2 = CALL_abstractmetamodel___MMLocalClass___has_global_property_by_name(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[1]);
+ if (UNTAG_Bool(REGB2)) {
+ /* ./metamodel//inheritance.nit:187 */
+ fra.me.REG[6] = CALL_abstractmetamodel___MMLocalClass___get_property_by_name(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:188 */
+ REGB2 = CALL_abstract_collection___Collection___has(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+ REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
+ if (UNTAG_Bool(REGB2)) {
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+ }
+ /* ./metamodel//inheritance.nit:189 */
+ REGB2 = CALL_abstractmetamodel___MMGlobalProperty___is_init(fra.me.REG[6])(fra.me.REG[6]);
+ if (UNTAG_Bool(REGB2)) {
+ fra.me.REG[7] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[6])(fra.me.REG[6]);
+ fra.me.REG[7] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[7])(fra.me.REG[7]);
+ fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[7])(fra.me.REG[7]);
+ fra.me.REG[8] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[0])(fra.me.REG[0]);
+ REGB2 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[7],fra.me.REG[8]));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ REGB2 = REGB1;
+ }
+ REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
+ } else {
+ REGB1 = TAG_Bool(false);
+ REGB2 = REGB1;
+ }
+ if (UNTAG_Bool(REGB2)) {
+ goto label2;
+ }
+ /* ./metamodel//inheritance.nit:190 */
+ fra.me.REG[8] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[6])(fra.me.REG[6]);
+ fra.me.REG[8] = CALL_abstractmetamodel___MMLocalProperty___name(fra.me.REG[8])(fra.me.REG[8]);
+ fra.me.REG[8] = CALL_string___Object___to_s(fra.me.REG[8])(fra.me.REG[8]);
+ fra.me.REG[8] = CALL_abstract_collection___Collection___first(fra.me.REG[8])(fra.me.REG[8]);
+ REGB2 = TAG_Char('@');
+ REGB1 = TAG_Bool(IS_EQUAL_ON(REGB2,fra.me.REG[8]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB4 = TAG_Bool(fra.me.REG[8]==NIT_NULL);
+ if (UNTAG_Bool(REGB4)) {
+ REGB4 = TAG_Bool(false);
+ REGB1 = REGB4;
+ } else {
+ /* ./../lib/standard//kernel.nit:347 */
+ REGB2 = TAG_Bool((fra.me.REG[8])==(REGB2));
+ /* ./metamodel//inheritance.nit:190 */
+ REGB1 = REGB2;
+ }
+ }
+ if (UNTAG_Bool(REGB1)) {
+ goto label2;
+ }
+ /* ./metamodel//inheritance.nit:191 */
+ REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 191);
+ }
+ REGB1 = CALL_abstract_collection___Collection___has(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[6]);
+ if (UNTAG_Bool(REGB1)) {
+ goto label2;
+ }
+ /* ./metamodel//inheritance.nit:192 */
+ REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 192);
+ }
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[6]);
}
- ((array___AbstractArray___add_t)CALL( variable7 /*conf_set*/,COLOR_abstract_collection___SimpleCollection___add))( variable7 /*conf_set*/, variable5 /*glob*/) /*Array::add*/;
- continue_12: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable4,COLOR_abstract_collection___Iterator___next))(variable4) /*Iterator::next*/;
+ label2: while(0);
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB3)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB3 = REGB1;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label3;
}
- break_12: while(0);
- continue_11: while(0);
- ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
}
- break_11: while(0);
- return_label10: while(false);
- tracehead = trace.prev;
+ label3: while(0);
+ /* ./metamodel//inheritance.nit:195 */
+ REGB3 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 195);
+ }
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB3 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB3)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB3 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:195 */
+ REGB1 = TAG_Int(1);
+ REGB2 = TAG_Bool(IS_EQUAL_OO(REGB3,REGB1));
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ /* ./../lib/standard//kernel.nit:207 */
+ REGB1 = TAG_Bool((REGB3)==(REGB1));
+ /* ./metamodel//inheritance.nit:195 */
+ REGB2 = REGB1;
+ }
+ REGB0 = REGB2;
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
+}
+void inheritance___MMLocalClass___make_visible_an_inherited_global_property(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 198;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___make_visible_an_inherited_global_property;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:201 */
+ REGB0 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_properties_by_name", LOCATE_inheritance, 201);
+ }
+ fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____properties_by_name(fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:202 */
+ fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___name(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:204 */
+ REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:205 */
+ fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ } else {
+ /* ./metamodel//inheritance.nit:207 */
+ fra.me.REG[4] = NEW_Array_array___Array___init();
+ fra.me.REG[3] = fra.me.REG[4];
+ /* ./metamodel//inheritance.nit:208 */
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2], fra.me.REG[3]);
+ }
+ /* ./metamodel//inheritance.nit:210 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
+ stack_frame_head = fra.me.prev;
return;
}
-void inheritance___MMLocalClass___add_direct_parent(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::add_direct_parent (src/metamodel//inheritance.nit:146,2--149:23)"};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_inheritance___MMLocalClass____direct_parents( self) /*MMLocalClass::_direct_parents*/;
- ((array___AbstractArray___add_t)CALL(variable1,COLOR_abstract_collection___SimpleCollection___add))(variable1, variable0 /*p*/) /*Array::add*/;
- tracehead = trace.prev;
+void inheritance___MMLocalClass___add_direct_parent(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 213;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___add_direct_parent;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:216 */
+ REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_direct_parents", LOCATE_inheritance, 216);
+ }
+ fra.me.REG[0] = ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t inheritance___MMLocalClass___computed_super_classes(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::computed_super_classes (src/metamodel//inheritance.nit:152,2--155:40)"};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
- variable0 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
- variable1 = variable0;
- if (UNTAG_Bool(variable1)) { /* and */
- variable1 = ATTR_abstractmetamodel___MMLocalClass____cshe( self) /*MMLocalClass::_cshe*/;
- variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
- }
- variable0 = variable1;
- goto return_label14;
- return_label14: while(false);
- tracehead = trace.prev;
- return variable0;
+val_t inheritance___MMLocalClass___computed_super_classes(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[1];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 219;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___computed_super_classes;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 2;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:222 */
+ fra.me.REG[1] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[1]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[1])(fra.me.REG[1], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____cshe(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ } else {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ }
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-val_t inheritance___MMLocalClass___computed_ancestors(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::computed_ancestors (src/metamodel//inheritance.nit:158,2--161:27)"};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
- variable0 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable0 == NIT_NULL /*null*/) || ((variable0 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable0, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable0,COLOR_kernel___Object_____eqeq))(variable0, NIT_NULL /*null*/) /*Map::==*/)))))));
- goto return_label15;
- return_label15: while(false);
- tracehead = trace.prev;
- return variable0;
+val_t inheritance___MMLocalClass___computed_ancestors(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 225;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___computed_ancestors;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:228 */
+ fra.me.REG[0] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return REGB0;
}
-val_t inheritance___MMLocalClass___ancestor_for(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::ancestor_for (src/metamodel//inheritance.nit:164,2--184:11)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ((static_type___MMLocalClass___ancestors_t)CALL( self,COLOR_static_type___MMLocalClass___ancestors))( self) /*MMLocalClass::ancestors*/;
- variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*Map::==*/)))))));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:168,3--26\n"); nit_exit(1);}
- variable1 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
- variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*c*/) /*Map::has_key*/;
- if (UNTAG_Bool(variable1)) { /*if*/
- variable1 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
- variable1 = ((abstract_collection___Map_____bra_t)CALL(variable1,COLOR_abstract_collection___Map_____bra))(variable1, variable0 /*c*/) /*Map::[]*/;
- goto return_label16;
- }
- variable2 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
- variable2 = ((abstractmetamodel___MMLocalClass___for_module_t)CALL( variable0 /*c*/,COLOR_abstractmetamodel___MMLocalClass___for_module))( variable0 /*c*/, variable2) /*MMLocalClass::for_module*/;
- variable1 = variable2;
- variable2 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___cshe))( self) /*MMLocalClass::cshe*/;
- variable2 = ((partial_order___PartialOrderElement_____leq_t)CALL(variable2,COLOR_partial_order___PartialOrderElement_____leq))(variable2, variable1 /*a*/) /*PartialOrderElement::<=*/;
- if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:174,3--18\n"); nit_exit(1);}
- variable2 = NIT_NULL /*decl variable ra*/;
- variable3 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
- variable3 = ((abstract_collection___Map___has_key_t)CALL(variable3,COLOR_abstract_collection___Map___has_key))(variable3, variable1 /*a*/) /*Map::has_key*/;
- if (UNTAG_Bool(variable3)) { /*if*/
- variable3 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
- variable3 = ((abstract_collection___Map_____bra_t)CALL(variable3,COLOR_abstract_collection___Map_____bra))(variable3, variable1 /*a*/) /*Map::[]*/;
- variable2 = variable3 /*ra=*/;
- } else { /*if*/
- variable3 = ((abstractmetamodel___MMLocalClass___global_t)CALL( variable0 /*c*/,COLOR_abstractmetamodel___MMLocalClass___global))( variable0 /*c*/) /*MMLocalClass::global*/;
- variable4 = ATTR_abstractmetamodel___MMLocalClass____global( self) /*MMLocalClass::_global*/;
- variable3 = TAG_Bool((variable3 == variable4) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3,variable4)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, variable4) /*MMGlobalClass::==*/)))));
- if (UNTAG_Bool(variable3)) { /*if*/
- variable3 = NEW_inheritance___MMRefineAncestor___init( self, variable0 /*c*/); /*new MMRefineAncestor*/
- variable2 = variable3 /*ra=*/;
- } else { /*if*/
- variable3 = ((static_type___MMLocalClass___get_type_t)CALL( self,COLOR_static_type___MMLocalClass___get_type))( self) /*MMLocalClass::get_type*/;
- variable4 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*c*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*c*/) /*MMLocalClass::get_type*/;
- variable5 = NEW_inheritance___MMSpecAncestor___init(variable3, variable4); /*new MMSpecAncestor*/
- variable3 = variable5;
- variable2 = variable3 /*ra=*/;
+val_t inheritance___MMLocalClass___ancestor_for(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 231;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___ancestor_for;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:235 */
+ fra.me.REG[2] = CALL_static_type___MMLocalClass___ancestors(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB0 = REGB1;
+ }
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 235);
+ }
+ /* ./metamodel//inheritance.nit:237 */
+ fra.me.REG[2] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 237);
+ }
+ REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:238 */
+ fra.me.REG[2] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 238);
+ }
+ fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ goto label1;
+ }
+ /* ./metamodel//inheritance.nit:240 */
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___mmmodule(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___for_module(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:241 */
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___cshe(fra.me.REG[0])(fra.me.REG[0]);
+ REGB0 = CALL_partial_order___PartialOrderElement_____leq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 241);
+ }
+ /* ./metamodel//inheritance.nit:243 */
+ fra.me.REG[4] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 243);
+ }
+ REGB0 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:244 */
+ fra.me.REG[4] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 244);
+ }
+ fra.me.REG[3] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[3]);
+ } else {
+ /* ./metamodel//inheritance.nit:245 */
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___global(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[5] = ATTR_abstractmetamodel___MMLocalClass____global(fra.me.REG[0]);
+ REGB0 = TAG_Bool(IS_EQUAL_ON(fra.me.REG[4],fra.me.REG[5]));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[5]);
+ REGB0 = REGB1;
}
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:246 */
+ fra.me.REG[5] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(fra.me.REG[0], fra.me.REG[1]);
+ fra.me.REG[3] = fra.me.REG[5];
+ } else {
+ /* ./metamodel//inheritance.nit:248 */
+ fra.me.REG[5] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[4] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(fra.me.REG[5], fra.me.REG[4]);
+ fra.me.REG[3] = fra.me.REG[4];
+ }
+ }
+ /* ./metamodel//inheritance.nit:250 */
+ fra.me.REG[0] = ATTR_static_type___MMLocalClass____ancestors(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 250);
}
- variable3 = ATTR_static_type___MMLocalClass____ancestors( self) /*MMLocalClass::_ancestors*/;
- ((abstract_collection___Map_____braeq_t)CALL(variable3,COLOR_abstract_collection___Map_____braeq))(variable3, variable0 /*c*/, variable2 /*ra*/) /*Map::[]=*/;
- variable1 = variable2 /*ra*/;
- goto return_label16;
- return_label16: while(false);
- tracehead = trace.prev;
- return variable1;
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:251 */
+ fra.me.REG[2] = fra.me.REG[3];
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
}
-val_t inheritance___MMLocalClass_____bra(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::[] (src/metamodel//inheritance.nit:187,2--193:13)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable2 = ((inheritance___MMLocalClass_____bra_t)CALL( self,COLOR_SUPER_inheritance___MMLocalClass_____bra))( self, variable0 /*glob*/) /*super MMLocalClass::[]*/;
- variable1 = variable2;
- variable2 = TAG_Bool(( variable1 /*prop*/ == NIT_NULL /*null*/) || (( variable1 /*prop*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*prop*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*prop*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*prop*/,COLOR_kernel___Object_____eqeq))( variable1 /*prop*/, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))));
- variable3 = variable2;
- if (UNTAG_Bool(variable3)) { /* and */
- variable3 = ATTR_abstractmetamodel___MMLocalClass____global_properties( self) /*MMLocalClass::_global_properties*/;
- variable3 = ((abstract_collection___Collection___has_t)CALL(variable3,COLOR_abstract_collection___Collection___has))(variable3, variable0 /*glob*/) /*Set::has*/;
- }
- variable2 = variable3;
- if (UNTAG_Bool(variable2)) { /*if*/
- variable2 = ((inheritance___MMLocalClass___inherit_local_property_t)CALL( self,COLOR_inheritance___MMLocalClass___inherit_local_property))( self, variable0 /*glob*/) /*MMLocalClass::inherit_local_property*/;
- variable1 = variable2 /*prop=*/;
- }
- variable1 = variable1 /*prop*/;
- goto return_label17;
- return_label17: while(false);
- tracehead = trace.prev;
- return variable1;
+val_t inheritance___MMLocalClass_____bra(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 254;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass_____bra;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:256 */
+ 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, 256);
+ }
+ 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]);
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:257 */
+ 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, 257);
+ }
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ goto label1;
+ } else {
+ /* ./metamodel//inheritance.nit:258 */
+ REGB0 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:259 */
+ fra.me.REG[1] = CALL_inheritance___MMLocalClass___inherit_local_property(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ fra.me.REG[2] = fra.me.REG[1];
+ goto label1;
+ } else {
+ /* ./metamodel//inheritance.nit:261 */
+ nit_abort("Aborted", NULL, LOCATE_inheritance, 261);
+ }
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[2];
}
-void inheritance___MMLocalClass___add_default_any_class(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::add_default_any_class (src/metamodel//inheritance.nit:196,2--203:28)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- static val_t once_value_variable3_19; static int once_bool_variable3_19;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ((array___AbstractArray___is_empty_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___Collection___is_empty))( variable0 /*supers*/) /*Array::is_empty*/;
- variable2 = variable1;
- if (UNTAG_Bool(variable2)) { /* and */
- variable2 = ((abstractmetamodel___MMLocalClass___name_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___name))( self) /*MMLocalClass::name*/;
- if (once_bool_variable3_19) variable3 = once_value_variable3_19;
- else {
- variable3 = NEW_string___String___with_native(BOX_NativeString("Object"), TAG_Int(6)); /*new String*/
- variable3 = ((symbol___String___to_symbol_t)CALL(variable3,COLOR_symbol___String___to_symbol))(variable3) /*String::to_symbol*/;
- once_value_variable3_19 = variable3;
- once_bool_variable3_19 = true;
+void inheritance___MMLocalClass___add_default_any_class(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ static val_t once_value_1; /* Once value */
+ static val_t once_value_2; /* Once value */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 265;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___add_default_any_class;
+ 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.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:268 */
+ REGB0 = CALL_abstract_collection___Collection___is_empty(fra.me.REG[1])(fra.me.REG[1]);
+ if (UNTAG_Bool(REGB0)) {
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ if (!once_value_1) {
+ if (!once_value_2) {
+ fra.me.REG[3] = BOX_NativeString("Object");
+ REGB0 = TAG_Int(6);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB0);
+ once_value_2 = fra.me.REG[3];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[3] = once_value_2;
+ fra.me.REG[3] = fra.me.REG[3];
+ fra.me.REG[3] = CALL_symbol___String___to_symbol(fra.me.REG[3])(fra.me.REG[3]);
+ once_value_1 = fra.me.REG[3];
+ register_static_object(&once_value_1);
+ } else fra.me.REG[3] = once_value_1;
+ fra.me.REG[3] = fra.me.REG[3];
+ REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[2],fra.me.REG[3]));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[3]);
+ REGB0 = REGB1;
}
- variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == variable3) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2,variable3)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, variable3) /*Symbol::==*/)))))));
- }
- variable1 = variable2;
- if (UNTAG_Bool(variable1)) { /*if*/
- variable2 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
- variable2 = ((inheritance___MMModule___type_any_t)CALL(variable2,COLOR_inheritance___MMModule___type_any))(variable2) /*MMModule::type_any*/;
- variable1 = variable2;
- variable2 = ((static_type___MMType___local_class_t)CALL( variable1 /*t_any*/,COLOR_static_type___MMType___local_class))( variable1 /*t_any*/) /*MMType::local_class*/;
- ((array___AbstractArray___add_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*supers*/, variable2) /*Array::add*/;
- variable3 = NEW_inheritance___MMDefaultAncestor___init( self, variable1 /*t_any*/); /*new MMDefaultAncestor*/
- variable2 = variable3;
- ((inheritance___MMLocalClass___add_direct_parent_t)CALL( self,COLOR_inheritance___MMLocalClass___add_direct_parent))( self, variable2 /*default*/) /*MMLocalClass::add_direct_parent*/;
- }
- tracehead = trace.prev;
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ } else {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ }
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:269 */
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___mmmodule(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_inheritance___MMModule___type_any(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:270 */
+ fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:271 */
+ fra.me.REG[3] = NEW_MMDefaultAncestor_inheritance___MMDefaultAncestor___init(fra.me.REG[0], fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:272 */
+ CALL_inheritance___MMLocalClass___add_direct_parent(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[3]);
+ }
+ stack_frame_head = fra.me.prev;
return;
}
-void inheritance___MMLocalClass___add_super_classes(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::add_super_classes (src/metamodel//inheritance.nit:207,2--216:18)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
- variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:210,3--22\n"); nit_exit(1);}
- variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
- variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable1,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable1) /*PartialOrderElement::direct_greaters*/;
- variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
- while (true) { /*for*/
- variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
- variable3 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL( variable2 /*ref*/,COLOR_abstractmetamodel___MMLocalClass___cshe))( variable2 /*ref*/) /*MMLocalClass::cshe*/;
- variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == NIT_NULL /*null*/) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
- if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:212,4--26\n"); nit_exit(1);}
- variable3 = ((abstractmetamodel___MMLocalClass___cshe_t)CALL( variable2 /*ref*/,COLOR_abstractmetamodel___MMLocalClass___cshe))( variable2 /*ref*/) /*MMLocalClass::cshe*/;
- variable3 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable3,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable3) /*PartialOrderElement::direct_greaters*/;
- variable3 = ((array___AbstractArray___iterator_t)CALL(variable3,COLOR_abstract_collection___Collection___iterator))(variable3) /*Array::iterator*/;
- while (true) { /*for*/
- variable4 = ((array___ArrayIterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable4)) break; /*for*/
- variable4 = ((array___ArrayIterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*ArrayIterator::item*/;
- variable6 = ATTR_abstractmetamodel___MMLocalClass____module( self) /*MMLocalClass::_module*/;
- variable6 = ((abstractmetamodel___MMLocalClass___for_module_t)CALL( variable4 /*sup*/,COLOR_abstractmetamodel___MMLocalClass___for_module))( variable4 /*sup*/, variable6) /*MMLocalClass::for_module*/;
- variable5 = variable6;
- variable6 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable5 /*cla*/ == NIT_NULL /*null*/) || (( variable5 /*cla*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable5 /*cla*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable5 /*cla*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable5 /*cla*/,COLOR_kernel___Object_____eqeq))( variable5 /*cla*/, NIT_NULL /*null*/) /*MMLocalClass::==*/)))))));
- if (!UNTAG_Bool(variable6)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:215,5--22\n"); nit_exit(1);}
- ((array___AbstractArray___add_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*supers*/, variable5 /*cla*/) /*Array::add*/;
- continue_22: while(0);
- ((array___ArrayIterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*ArrayIterator::next*/;
+void inheritance___MMLocalClass___add_super_classes(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[7];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 276;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___add_super_classes;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 8;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:279 */
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB0 = REGB1;
}
- break_22: while(0);
- continue_21: while(0);
- ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
}
- break_21: while(0);
- tracehead = trace.prev;
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 279);
+ }
+ /* ./metamodel//inheritance.nit:280 */
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 280);
+ }
+ fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../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[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../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[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:281 */
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___cshe(fra.me.REG[4])(fra.me.REG[4]);
+ fra.me.REG[4] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB1 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[5] = ATTR_array___Array____items(fra.me.REG[4]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB2 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[4])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB2 = ATTR_array___AbstractArrayRead____length(fra.me.REG[4]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB2 = TAG_Bool(UNTAG_Int(REGB1)<UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:237 */
+ if (UNTAG_Bool(REGB2)) {
+ /* ./../lib/standard//collection//array.nit:238 */
+ REGB2 = TAG_Bool(fra.me.REG[5]==NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[6] = ((Nit_NativeArray)fra.me.REG[5])->val[UNTAG_Int(REGB1)];
+ /* ./metamodel//inheritance.nit:282 */
+ REGB2 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____mmmodule(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_mmmodule", LOCATE_inheritance, 282);
+ }
+ fra.me.REG[7] = ATTR_abstractmetamodel___MMLocalClass____mmmodule(fra.me.REG[0]);
+ fra.me.REG[7] = CALL_abstractmetamodel___MMLocalClass___for_module(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[7]);
+ /* ./metamodel//inheritance.nit:283 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[7]);
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB2 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB2 = TAG_Int(UNTAG_Int(REGB1)+UNTAG_Int(REGB2));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = REGB2;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label1;
+ }
+ }
+ label1: while(0);
+ /* ./../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 label2;
+ }
+ }
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void inheritance___MMLocalClass___add_explicit_classes(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::add_explicit_classes (src/metamodel//inheritance.nit:221,2--225:27)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_inheritance___MMLocalClass____direct_parents( self) /*MMLocalClass::_direct_parents*/;
- variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
- while (true) { /*for*/
- variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
- variable3 = ((static_type___MMAncestor___local_class_t)CALL( variable2 /*p*/,COLOR_static_type___MMAncestor___local_class))( variable2 /*p*/) /*MMAncestor::local_class*/;
- ((array___AbstractArray___add_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*supers*/, variable3) /*Array::add*/;
- continue_24: while(0);
- ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
- }
- break_24: while(0);
- tracehead = trace.prev;
+void inheritance___MMLocalClass___add_explicit_classes(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 288;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___add_explicit_classes;
+ 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.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:291 */
+ REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_direct_parents", LOCATE_inheritance, 291);
+ }
+ fra.me.REG[0] = ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0]);
+ /* ./../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[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[0]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[0]);
+ /* ./../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[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:292 */
+ fra.me.REG[3] = CALL_static_type___MMAncestor___local_class(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[3]);
+ /* ./../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;
+ }
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-void inheritance___MMLocalClass___compute_super_parents(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::compute_super_parents (src/metamodel//inheritance.nit:229,2--234:26)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ((array___AbstractArray___iterator_t)CALL( variable0 /*supers*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*supers*/) /*Array::iterator*/;
- while (true) { /*for*/
- variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
- variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*p*/ == NIT_NULL /*null*/) || (( variable2 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))( variable2 /*p*/, NIT_NULL /*null*/) /*MMLocalClass::==*/)))))));
- if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:233,4--19\n"); nit_exit(1);}
- ((inheritance___MMLocalClass___compute_super_classes_t)CALL( variable2 /*p*/,COLOR_inheritance___MMLocalClass___compute_super_classes))( variable2 /*p*/) /*MMLocalClass::compute_super_classes*/;
- continue_26: while(0);
- ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
- }
- break_26: while(0);
- tracehead = trace.prev;
+void inheritance___MMLocalClass___compute_super_parents(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 296;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___compute_super_parents;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./../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[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[0] = ATTR_array___Array____items(fra.me.REG[1]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../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[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[2] = ((Nit_NativeArray)fra.me.REG[0])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:300 */
+ CALL_inheritance___MMLocalClass___compute_super_classes(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../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;
+ }
+ }
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t inheritance___MMLocalClass___build_ancestors(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::build_ancestors (src/metamodel//inheritance.nit:238,2--253:22)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- trace.prev = tracehead; tracehead = &trace;
- variable1 = NEW_array___Array___init(); /*new Array[MMAncestor]*/
- variable0 = variable1;
- variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
- variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*PartialOrderElement::==*/)))))));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:243,3--22\n"); nit_exit(1);}
- variable1 = ATTR_abstractmetamodel___MMLocalClass____crhe( self) /*MMLocalClass::_crhe*/;
- variable1 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable1,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable1) /*PartialOrderElement::direct_greaters*/;
- variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
- while (true) { /*for*/
- variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
- variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable2 /*p*/ == self) || (( variable2 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable2 /*p*/, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable2 /*p*/,COLOR_kernel___Object_____eqeq))( variable2 /*p*/, self) /*MMLocalClass::==*/)))))));
- if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:245,4--19\n"); nit_exit(1);}
- variable4 = NEW_inheritance___MMRefineAncestor___init( self, variable2 /*p*/); /*new MMRefineAncestor*/
- variable3 = variable4;
- ((inheritance___MMAncestor___add_in_t)CALL( variable3 /*anc*/,COLOR_inheritance___MMAncestor___add_in))( variable3 /*anc*/, variable0 /*all_ancestors*/) /*MMRefineAncestor::add_in*/;
- continue_28: while(0);
- ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
- }
- break_28: while(0);
- variable1 = ATTR_inheritance___MMLocalClass____direct_parents( self) /*MMLocalClass::_direct_parents*/;
- variable1 = ((array___AbstractArray___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Array::iterator*/;
- while (true) { /*for*/
- variable2 = ((array___ArrayIterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((array___ArrayIterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*ArrayIterator::item*/;
- variable3 = ((static_type___MMAncestor___local_class_t)CALL( variable2 /*anc*/,COLOR_static_type___MMAncestor___local_class))( variable2 /*anc*/) /*MMAncestor::local_class*/;
- variable3 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable3 == self) || ((variable3 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable3, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable3,COLOR_kernel___Object_____eqeq))(variable3, self) /*MMLocalClass::==*/)))))));
- if (!UNTAG_Bool(variable3)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:250,4--33\n"); nit_exit(1);}
- ((inheritance___MMAncestor___add_in_t)CALL( variable2 /*anc*/,COLOR_inheritance___MMAncestor___add_in))( variable2 /*anc*/, variable0 /*all_ancestors*/) /*MMAncestor::add_in*/;
- continue_29: while(0);
- ((array___ArrayIterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*ArrayIterator::next*/;
- }
- break_29: while(0);
- variable0 = variable0 /*all_ancestors*/;
- goto return_label27;
- return_label27: while(false);
- tracehead = trace.prev;
- return variable0;
-}
-val_t inheritance___MMLocalClass___group_ancestors(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::group_ancestors (src/metamodel//inheritance.nit:256,2--275:12)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable2 = NEW_hash___HashMap___init(); /*new HashMap[MMLocalClass, Set[MMAncestor]]*/
- variable1 = variable2;
- variable2 = ((array___AbstractArray___iterator_t)CALL( variable0 /*all*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*all*/) /*Array::iterator*/;
- while (true) { /*for*/
- variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable3)) break; /*for*/
- variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
- variable5 = ((static_type___MMAncestor___local_class_t)CALL( variable3 /*a*/,COLOR_static_type___MMAncestor___local_class))( variable3 /*a*/) /*MMAncestor::local_class*/;
- variable4 = variable5;
- variable5 = NIT_NULL /*decl variable set*/;
- ((inheritance___MMLocalClass___compute_ancestors_t)CALL( variable4 /*c*/,COLOR_inheritance___MMLocalClass___compute_ancestors))( variable4 /*c*/) /*MMLocalClass::compute_ancestors*/;
- variable6 = ((abstract_collection___CoupleMap___has_key_t)CALL( variable1 /*map*/,COLOR_abstract_collection___Map___has_key))( variable1 /*map*/, variable4 /*c*/) /*HashMap::has_key*/;
- if (UNTAG_Bool(variable6)) { /*if*/
- variable6 = ((abstract_collection___CoupleMap_____bra_t)CALL( variable1 /*map*/,COLOR_abstract_collection___Map_____bra))( variable1 /*map*/, variable4 /*c*/) /*HashMap::[]*/;
- variable5 = variable6 /*set=*/;
- } else { /*if*/
- variable6 = NEW_hash___HashSet___init(); /*new HashSet[MMAncestor]*/
- variable5 = variable6 /*set=*/;
- ((hash___HashMap_____braeq_t)CALL( variable1 /*map*/,COLOR_abstract_collection___Map_____braeq))( variable1 /*map*/, variable4 /*c*/, variable5 /*set*/) /*HashMap::[]=*/;
+val_t inheritance___MMLocalClass___build_ancestors(val_t p0){
+ struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t REGB2;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 304;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___build_ancestors;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ 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[0] = p0;
+ /* ./metamodel//inheritance.nit:307 */
+ fra.me.REG[1] = NEW_Array_array___Array___init();
+ /* ./metamodel//inheritance.nit:309 */
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = TAG_Bool(false);
+ REGB0 = REGB1;
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[2])(fra.me.REG[2], NIT_NULL);
+ REGB0 = REGB1;
}
- ((abstract_collection___SimpleCollection___add_t)CALL( variable5 /*set*/,COLOR_abstract_collection___SimpleCollection___add))( variable5 /*set*/, variable3 /*a*/) /*Set::add*/;
- continue_31: while(0);
- ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
- }
- break_31: while(0);
- variable1 = variable1 /*map*/;
- goto return_label30;
- return_label30: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-val_t inheritance___MMLocalClass___merge_ancestors(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::merge_ancestors (src/metamodel//inheritance.nit:278,2--308:18)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- val_t variable9;
- val_t variable10;
- val_t variable11;
- val_t variable12;
- val_t variable13;
- val_t variable14;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable2 = NEW_hash___HashSet___init(); /*new HashSet[MMAncestor]*/
- variable1 = variable2;
- variable3 = NEW_array___Array___init(); /*new Array[MMAncestor]*/
- variable2 = variable3;
- variable3 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*set*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*set*/) /*Set::iterator*/;
- while (true) { /*for*/
- variable4 = ((abstract_collection___Iterator___is_ok_t)CALL(variable3,COLOR_abstract_collection___Iterator___is_ok))(variable3) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable4)) break; /*for*/
- variable4 = ((abstract_collection___Iterator___item_t)CALL(variable3,COLOR_abstract_collection___Iterator___item))(variable3) /*Iterator::item*/;
- variable6 = ((abstract_collection___Collection___iterator_t)CALL( variable0 /*set*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*set*/) /*Set::iterator*/;
- variable5 = variable6;
- variable6 = TAG_Bool(true);
- while (true) { /*while*/
- variable7 = ((abstract_collection___Iterator___is_ok_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___is_ok))( variable5 /*it*/) /*Iterator::is_ok*/;
- variable8 = variable7;
- if (UNTAG_Bool(variable8)) { /* and */
- variable8 = variable6 /*search*/;
- }
- variable7 = variable8;
- if (!UNTAG_Bool(variable7)) break; /* while*/
- variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
- variable8 = TAG_Bool(( variable4 /*t*/ == variable8) || (( variable4 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable4 /*t*/,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))( variable4 /*t*/, variable8) /*MMAncestor::==*/)))));
- variable7 = variable8;
- variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
- variable8 = ((hash___HashSet___has_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___Collection___has))( variable1 /*marks*/, variable8) /*HashSet::has*/;
- variable7 = variable8 /*a=*/;
- variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
- variable8 = ((static_type___MMAncestor___stype_t)CALL(variable8,COLOR_static_type___MMAncestor___stype))(variable8) /*MMAncestor::stype*/;
- variable9 = ((static_type___MMAncestor___stype_t)CALL( variable4 /*t*/,COLOR_static_type___MMAncestor___stype))( variable4 /*t*/) /*MMAncestor::stype*/;
- variable8 = ((static_type___MMType_____l_t)CALL(variable8,COLOR_static_type___MMType_____l))(variable8, variable9) /*MMType::<*/;
- variable7 = variable8 /*a=*/;
- variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
- variable8 = TAG_Bool(( variable4 /*t*/ == variable8) || (( variable4 /*t*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable4 /*t*/,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable4 /*t*/,COLOR_kernel___Object_____eqeq))( variable4 /*t*/, variable8) /*MMAncestor::==*/)))));
- variable9 = variable8;
- if (!UNTAG_Bool(variable9)) { /* or */
- variable9 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
- variable9 = ((hash___HashSet___has_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___Collection___has))( variable1 /*marks*/, variable9) /*HashSet::has*/;
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 309);
+ }
+ /* ./metamodel//inheritance.nit:310 */
+ fra.me.REG[2] = ATTR_abstractmetamodel___MMLocalClass____crhe(fra.me.REG[0]);
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 310);
+ }
+ fra.me.REG[2] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./../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[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[3] = ATTR_array___Array____items(fra.me.REG[2]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[2])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[2]);
+ /* ./../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[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
}
- variable8 = variable9;
- variable8 = TAG_Bool(!UNTAG_Bool(variable8));
- if (UNTAG_Bool(variable8)) { /* and */
- variable8 = ((abstract_collection___Iterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*Iterator::item*/;
- variable8 = ((static_type___MMAncestor___stype_t)CALL(variable8,COLOR_static_type___MMAncestor___stype))(variable8) /*MMAncestor::stype*/;
- variable9 = ((static_type___MMAncestor___stype_t)CALL( variable4 /*t*/,COLOR_static_type___MMAncestor___stype))( variable4 /*t*/) /*MMAncestor::stype*/;
- variable8 = ((static_type___MMType_____l_t)CALL(variable8,COLOR_static_type___MMType_____l))(variable8, variable9) /*MMType::<*/;
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[3])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:311 */
+ REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[4],fra.me.REG[0]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[0]);
+ REGB1 = REGB2;
}
- if (UNTAG_Bool(variable8)) { /*if*/
- ((hash___HashSet___add_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___SimpleCollection___add))( variable1 /*marks*/, variable4 /*t*/) /*HashSet::add*/;
- variable6 = TAG_Bool(false) /*search=*/;
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 311);
}
- ((abstract_collection___Iterator___next_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___next))( variable5 /*it*/) /*Iterator::next*/;
- continue_34: while(0);
+ /* ./metamodel//inheritance.nit:312 */
+ fra.me.REG[4] = NEW_MMRefineAncestor_inheritance___MMRefineAncestor___init(fra.me.REG[0], fra.me.REG[4]);
+ /* ./metamodel//inheritance.nit:313 */
+ CALL_inheritance___MMAncestor___add_in(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
+ /* ./../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;
}
- break_34: while(0);
- variable7 = ((hash___HashSet___has_t)CALL( variable1 /*marks*/,COLOR_abstract_collection___Collection___has))( variable1 /*marks*/, variable4 /*t*/) /*HashSet::has*/;
- if (UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable7)))) { /*if*/
- ((array___AbstractArray___add_t)CALL( variable2 /*res*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*res*/, variable4 /*t*/) /*Array::add*/;
+ }
+ label1: while(0);
+ /* ./metamodel//inheritance.nit:315 */
+ REGB0 = TAG_Bool(ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_direct_parents", LOCATE_inheritance, 315);
+ }
+ fra.me.REG[3] = ATTR_inheritance___MMLocalClass____direct_parents(fra.me.REG[0]);
+ /* ./../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[2] = 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[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[4] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:316 */
+ fra.me.REG[5] = CALL_static_type___MMAncestor___local_class(fra.me.REG[4])(fra.me.REG[4]);
+ REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[5],fra.me.REG[0]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[0]);
+ REGB1 = REGB2;
+ }
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Assert failed", NULL, LOCATE_inheritance, 316);
+ }
+ /* ./metamodel//inheritance.nit:317 */
+ CALL_inheritance___MMAncestor___add_in(fra.me.REG[4])(fra.me.REG[4], fra.me.REG[1]);
+ /* ./../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 label2;
}
- continue_33: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable3,COLOR_abstract_collection___Iterator___next))(variable3) /*Iterator::next*/;
- }
- break_33: while(0);
- variable3 = ((array___AbstractArray___length_t)CALL( variable2 /*res*/,COLOR_abstract_collection___Collection___length))( variable2 /*res*/) /*Array::length*/;
- variable3 = TAG_Bool(UNTAG_Int(variable3)>UNTAG_Int( TAG_Int(1)));
- if (UNTAG_Bool(variable3)) { /*if*/
- variable3 = ((file___Object___stderr_t)CALL( self,COLOR_file___Object___stderr))( self) /*MMLocalClass::stderr*/;
- variable4 = NEW_string___String___init(); /*new String*/
- variable5 = NEW_string___String___with_native(BOX_NativeString("Fatal error: Incompatibles ancestors for "), TAG_Int(41)); /*new String*/
- variable6 = variable5;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable6) /*String::append*/;
- variable7 = ((abstractmetamodel___MMLocalClass___name_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___name))( self) /*MMLocalClass::name*/;
- variable8 = variable7;
- variable8 = ((string___String___to_s_t)CALL(variable8,COLOR_string___Object___to_s))(variable8) /*String::to_s*/;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable8) /*String::append*/;
- variable9 = NEW_string___String___with_native(BOX_NativeString(": "), TAG_Int(2)); /*new String*/
- variable10 = variable9;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable10) /*String::append*/;
- variable11 = NEW_string___String___with_native(BOX_NativeString(", "), TAG_Int(2)); /*new String*/
- variable11 = ((string___Collection___join_t)CALL( variable2 /*res*/,COLOR_string___Collection___join))( variable2 /*res*/, variable11) /*Array::join*/;
- variable12 = variable11;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable12) /*String::append*/;
- variable13 = NEW_string___String___with_native(BOX_NativeString("\n"), TAG_Int(1)); /*new String*/
- variable14 = variable13;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable14) /*String::append*/;
- ((file___OFStream___write_t)CALL(variable3,COLOR_stream___OStream___write))(variable3, variable4) /*OFStream::write*/;
- exit(UNTAG_Int( TAG_Int(1)));
- }
- variable3 = ((abstract_collection___IndexedCollection___first_t)CALL( variable2 /*res*/,COLOR_abstract_collection___Collection___first))( variable2 /*res*/) /*Array::first*/;
- variable1 = variable3;
- goto return_label32;
- return_label32: while(false);
- tracehead = trace.prev;
- return variable1;
+ }
+ label2: while(0);
+ /* ./metamodel//inheritance.nit:319 */
+ goto label3;
+ label3: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[1];
}
-val_t inheritance___MMLocalClass___inherit_local_property(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalClass::inherit_local_property (src/metamodel//inheritance.nit:311,2--339:13)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- val_t variable9;
- val_t variable10;
- val_t variable11;
- val_t variable12;
- val_t variable13;
- val_t variable14;
- val_t variable15;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global( self) /*MMLocalClass::_local_property_by_global*/;
- variable1 = ((abstract_collection___Map___has_key_t)CALL(variable1,COLOR_abstract_collection___Map___has_key))(variable1, variable0 /*glob*/) /*Map::has_key*/;
- if (!UNTAG_Bool( TAG_Bool(!UNTAG_Bool(variable1)))) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:316,3--51\n"); nit_exit(1);}
- variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*glob*/ == NIT_NULL /*null*/) || (( variable0 /*glob*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*glob*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*glob*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*glob*/,COLOR_kernel___Object_____eqeq))( variable0 /*glob*/, NIT_NULL /*null*/) /*MMGlobalProperty::==*/)))))));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:317,3--21\n"); nit_exit(1);}
- variable2 = ((inheritance___MMGlobalProperty___get_compatible_concrete_properties_for_t)CALL( variable0 /*glob*/,COLOR_inheritance___MMGlobalProperty___get_compatible_concrete_properties_for))( variable0 /*glob*/, self) /*MMGlobalProperty::get_compatible_concrete_properties_for*/;
- variable1 = variable2;
- variable2 = ((array___AbstractArray___length_t)CALL( variable1 /*impls*/,COLOR_abstract_collection___Collection___length))( variable1 /*impls*/) /*Array::length*/;
- variable2 = TAG_Bool((variable2)!=( TAG_Int(1)));
- if (UNTAG_Bool(variable2)) { /*if*/
- variable2 = ((file___Object___stderr_t)CALL( self,COLOR_file___Object___stderr))( self) /*MMLocalClass::stderr*/;
- variable3 = NEW_string___String___with_native(BOX_NativeString("Fatal error: inherit_local_property error\n"), TAG_Int(42)); /*new String*/
- ((file___OFStream___write_t)CALL(variable2,COLOR_stream___OStream___write))(variable2, variable3) /*OFStream::write*/;
- variable2 = NEW_string___String___init(); /*new String*/
- variable3 = NEW_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
- variable4 = variable3;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/;
- variable5 = ((abstractmetamodel___MMLocalClass___module_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___module))( self) /*MMLocalClass::module*/;
- variable6 = variable5;
- variable6 = ((string___String___to_s_t)CALL(variable6,COLOR_string___Object___to_s))(variable6) /*String::to_s*/;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable6) /*String::append*/;
- variable7 = NEW_string___String___with_native(BOX_NativeString("::"), TAG_Int(2)); /*new String*/
- variable8 = variable7;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/;
- variable9 = self;
- variable9 = ((string___String___to_s_t)CALL(variable9,COLOR_string___Object___to_s))(variable9) /*String::to_s*/;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable9) /*String::append*/;
- variable10 = NEW_string___String___with_native(BOX_NativeString(" "), TAG_Int(1)); /*new String*/
- variable11 = variable10;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable11) /*String::append*/;
- variable12 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___intro))( variable0 /*glob*/) /*MMGlobalProperty::intro*/;
- variable12 = ((abstractmetamodel___MMLocalProperty___full_name_t)CALL(variable12,COLOR_abstractmetamodel___MMLocalProperty___full_name))(variable12) /*MMConcreteProperty::full_name*/;
- variable13 = variable12;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable13) /*String::append*/;
- variable14 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable15 = variable14;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable15) /*String::append*/;
- ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable2) /*MMLocalClass::print*/;
- variable2 = ((array___AbstractArray___iterator_t)CALL( variable1 /*impls*/,COLOR_abstract_collection___Collection___iterator))( variable1 /*impls*/) /*Array::iterator*/;
- while (true) { /*for*/
- variable3 = ((array___ArrayIterator___is_ok_t)CALL(variable2,COLOR_abstract_collection___Iterator___is_ok))(variable2) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable3)) break; /*for*/
- variable3 = ((array___ArrayIterator___item_t)CALL(variable2,COLOR_abstract_collection___Iterator___item))(variable2) /*ArrayIterator::item*/;
- variable4 = NEW_string___String___init(); /*new String*/
- variable5 = NEW_string___String___with_native(BOX_NativeString(" "), TAG_Int(3)); /*new String*/
- variable6 = variable5;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable6) /*String::append*/;
- variable7 = ((abstractmetamodel___MMLocalProperty___full_name_t)CALL( variable3 /*i*/,COLOR_abstractmetamodel___MMLocalProperty___full_name))( variable3 /*i*/) /*MMConcreteProperty::full_name*/;
- variable8 = variable7;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable8) /*String::append*/;
- variable9 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable10 = variable9;
- ((string___String___append_t)CALL(variable4,COLOR_abstract_collection___IndexedCollection___append))(variable4, variable10) /*String::append*/;
- ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable4) /*MMLocalClass::print*/;
- continue_36: while(0);
- ((array___ArrayIterator___next_t)CALL(variable2,COLOR_abstract_collection___Iterator___next))(variable2) /*ArrayIterator::next*/;
+val_t inheritance___MMLocalClass___group_ancestors(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[6];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 322;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___group_ancestors;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 7;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:326 */
+ fra.me.REG[0] = NEW_HashMap_hash_collection___HashMap___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[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[1]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[1])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[1]);
+ /* ./../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[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:328 */
+ fra.me.REG[4] = CALL_static_type___MMAncestor___local_class(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:332 */
+ CALL_inheritance___MMLocalClass___compute_ancestors(fra.me.REG[4])(fra.me.REG[4]);
+ /* ./metamodel//inheritance.nit:333 */
+ REGB1 = CALL_abstract_collection___MapRead___has_key(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
+ if (UNTAG_Bool(REGB1)) {
+ /* ./metamodel//inheritance.nit:334 */
+ fra.me.REG[5] = CALL_abstract_collection___MapRead_____bra(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4]);
+ } else {
+ /* ./metamodel//inheritance.nit:336 */
+ fra.me.REG[6] = NEW_HashSet_hash_collection___HashSet___init();
+ fra.me.REG[5] = fra.me.REG[6];
+ /* ./metamodel//inheritance.nit:337 */
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[4], fra.me.REG[5]);
+ }
+ /* ./metamodel//inheritance.nit:339 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[3]);
+ /* ./../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;
}
- break_36: while(0);
- variable2 = NEW_string___String___init(); /*new String*/
- variable3 = NEW_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
- variable4 = variable3;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/;
- variable5 = ((abstractmetamodel___MMGlobalProperty___concrete_property_hierarchy_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___concrete_property_hierarchy))( variable0 /*glob*/) /*MMGlobalProperty::concrete_property_hierarchy*/;
- variable5 = ((partial_order___PartialOrder___first_t)CALL(variable5,COLOR_abstract_collection___Collection___first))(variable5) /*PartialOrder::first*/;
- variable6 = variable5;
- variable6 = ((string___String___to_s_t)CALL(variable6,COLOR_string___Object___to_s))(variable6) /*String::to_s*/;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable6) /*String::append*/;
- variable7 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable8 = variable7;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/;
- ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable2) /*MMLocalClass::print*/;
- variable2 = NEW_string___String___init(); /*new String*/
- variable3 = NEW_string___String___with_native(BOX_NativeString("------- "), TAG_Int(8)); /*new String*/
- variable4 = variable3;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable4) /*String::append*/;
- variable5 = ((abstractmetamodel___MMGlobalProperty___concrete_property_hierarchy_t)CALL( variable0 /*glob*/,COLOR_abstractmetamodel___MMGlobalProperty___concrete_property_hierarchy))( variable0 /*glob*/) /*MMGlobalProperty::concrete_property_hierarchy*/;
- variable5 = ((partial_order___PartialOrder___to_dot_t)CALL(variable5,COLOR_partial_order___PartialOrder___to_dot))(variable5) /*PartialOrder::to_dot*/;
- variable6 = variable5;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable6) /*String::append*/;
- variable7 = NEW_string___String___with_native(BOX_NativeString(""), TAG_Int(0)); /*new String*/
- variable8 = variable7;
- ((string___String___append_t)CALL(variable2,COLOR_abstract_collection___IndexedCollection___append))(variable2, variable8) /*String::append*/;
- ((file___Object___print_t)CALL( self,COLOR_file___Object___print))( self, variable2) /*MMLocalClass::print*/;
- exit(UNTAG_Int( TAG_Int(1)));
- }
- variable3 = ((abstract_collection___IndexedCollection___first_t)CALL( variable1 /*impls*/,COLOR_abstract_collection___Collection___first))( variable1 /*impls*/) /*Array::first*/;
- variable2 = variable3;
- variable4 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL( variable2 /*impl*/,COLOR_abstractmetamodel___MMLocalProperty___local_class))( variable2 /*impl*/) /*MMConcreteProperty::local_class*/;
- variable4 = ((inheritance___MMLocalClass___ancestor_for_t)CALL( self,COLOR_inheritance___MMLocalClass___ancestor_for))( self, variable4) /*MMLocalClass::ancestor_for*/;
- variable3 = variable4;
- variable4 = ((static_type___MMAncestor___local_class_t)CALL( variable3 /*ac*/,COLOR_static_type___MMAncestor___local_class))( variable3 /*ac*/) /*MMAncestor::local_class*/;
- ((inheritance___MMLocalClass___inherit_global_properties_t)CALL(variable4,COLOR_inheritance___MMLocalClass___inherit_global_properties))(variable4) /*MMLocalClass::inherit_global_properties*/;
- variable5 = ((static_type___MMAncestor___stype_t)CALL( variable3 /*ac*/,COLOR_static_type___MMAncestor___stype))( variable3 /*ac*/) /*MMAncestor::stype*/;
- variable4 = variable5;
- variable5 = ((static_type___MMType___local_class_t)CALL( variable4 /*a*/,COLOR_static_type___MMType___local_class))( variable4 /*a*/) /*MMType::local_class*/;
- variable5 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable5 == self) || ((variable5 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable5, self)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))(variable5, self) /*MMLocalClass::==*/)))))));
- if (!UNTAG_Bool(variable5)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:335,3--30\n"); nit_exit(1);}
- variable6 = ((static_type___MMType___select_property_t)CALL( variable4 /*a*/,COLOR_static_type___MMType___select_property))( variable4 /*a*/, variable0 /*glob*/) /*MMType::select_property*/;
- variable5 = variable6;
- variable6 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable5 /*sup*/ == NIT_NULL /*null*/) || (( variable5 /*sup*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable5 /*sup*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable5 /*sup*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable5 /*sup*/,COLOR_kernel___Object_____eqeq))( variable5 /*sup*/, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))))));
- if (!UNTAG_Bool(variable6)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:337,3--20\n"); nit_exit(1);}
- variable7 = ((static_type___MMLocalClass___get_type_t)CALL( self,COLOR_static_type___MMLocalClass___get_type))( self) /*MMLocalClass::get_type*/;
- variable7 = ((inheritance___MMLocalProperty___inherit_to_t)CALL( variable5 /*sup*/,COLOR_inheritance___MMLocalProperty___inherit_to))( variable5 /*sup*/, variable7) /*MMLocalProperty::inherit_to*/;
- variable6 = variable7;
- variable1 = variable6 /*prop*/;
- goto return_label35;
- return_label35: while(false);
- tracehead = trace.prev;
- return variable1;
+ }
+ label1: while(0);
+ /* ./metamodel//inheritance.nit:341 */
+ goto label2;
+ label2: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-val_t inheritance___MMConcreteProperty___is_deferred(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMConcreteProperty::is_deferred (src/metamodel//inheritance.nit:344,2--345:39)"};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = TAG_Bool(false);
- goto return_label37;
- return_label37: while(false);
- tracehead = trace.prev;
- return variable0;
+val_t inheritance___MMLocalClass___merge_ancestors(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[4];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ 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 */
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 344;
+ fra.me.meth = LOCATE_inheritance___MMLocalClass___merge_ancestors;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 5;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:347 */
+ fra.me.REG[2] = NEW_HashSet_hash_collection___HashSet___init();
+ /* ./metamodel//inheritance.nit:348 */
+ fra.me.REG[3] = NEW_Array_array___Array___init();
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[1])(fra.me.REG[1], (&(fra.me)), ((fun_t)OC_inheritance___MMLocalClass___merge_ancestors_1));
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[3]);
+ /* ./metamodel//inheritance.nit:370 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:214 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB0)>UNTAG_Int(REGB1));
+ /* ./metamodel//inheritance.nit:370 */
+ if (UNTAG_Bool(REGB1)) {
+ /* ./metamodel//inheritance.nit:371 */
+ fra.me.REG[2] = CALL_file___Object___stderr(fra.me.REG[0])(fra.me.REG[0]);
+ REGB1 = TAG_Int(5);
+ fra.me.REG[1] = NEW_Array_array___Array___with_capacity(REGB1);
+ if (!once_value_3) {
+ fra.me.REG[4] = BOX_NativeString("Fatal error: Incompatibles ancestors for ");
+ REGB1 = TAG_Int(41);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
+ once_value_3 = fra.me.REG[4];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[4] = once_value_3;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ fra.me.REG[4] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[4] = CALL_string___Object___to_s(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ if (!once_value_4) {
+ fra.me.REG[4] = BOX_NativeString(": ");
+ REGB1 = TAG_Int(2);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
+ once_value_4 = fra.me.REG[4];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[4] = once_value_4;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ if (!once_value_5) {
+ fra.me.REG[4] = BOX_NativeString(", ");
+ REGB1 = TAG_Int(2);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
+ once_value_5 = fra.me.REG[4];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[4] = once_value_5;
+ fra.me.REG[4] = fra.me.REG[4];
+ fra.me.REG[4] = CALL_string___Collection___join(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[4]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ if (!once_value_6) {
+ fra.me.REG[4] = BOX_NativeString("\n");
+ REGB1 = TAG_Int(1);
+ fra.me.REG[4] = NEW_String_string___String___with_native(fra.me.REG[4], REGB1);
+ once_value_6 = fra.me.REG[4];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[4] = once_value_6;
+ fra.me.REG[4] = fra.me.REG[4];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[4]);
+ fra.me.REG[1] = CALL_string___Object___to_s(fra.me.REG[1])(fra.me.REG[1]);
+ CALL_stream___OStream___write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:372 */
+ REGB1 = TAG_Int(1);
+ CALL_kernel___Object___exit(fra.me.REG[0])(fra.me.REG[0], REGB1);
+ }
+ /* ./metamodel//inheritance.nit:374 */
+ fra.me.REG[3] = CALL_abstract_collection___Collection___first(fra.me.REG[3])(fra.me.REG[3]);
+ goto label7;
+ label7: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[3];
}
-val_t inheritance___MMGlobalProperty___get_compatible_concrete_properties_for(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMGlobalProperty::get_compatible_concrete_properties_for (src/metamodel//inheritance.nit:349,2--373:41)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable2 = ATTR_abstractmetamodel___MMGlobalProperty____concrete_property_hierarchy( self) /*MMGlobalProperty::_concrete_property_hierarchy*/;
- variable1 = variable2;
- variable2 = ((partial_order___PartialOrder___length_t)CALL( variable1 /*impl_hier*/,COLOR_abstract_collection___Collection___length))( variable1 /*impl_hier*/) /*PartialOrder::length*/;
- variable2 = TAG_Bool((variable2)==( TAG_Int(1)));
- if (UNTAG_Bool(variable2)) { /*if*/
- variable2 = NEW_array___Array___with_capacity(TAG_Int(1)); /*new Array[MMConcreteProperty]*/
- variable3 = ((abstractmetamodel___MMGlobalProperty___intro_t)CALL( self,COLOR_abstractmetamodel___MMGlobalProperty___intro))( self) /*MMGlobalProperty::intro*/;
- ((array___AbstractArray___add_t)CALL(variable2,COLOR_abstract_collection___SimpleCollection___add))(variable2, variable3) /*Array::add*/;
- variable1 = variable2;
- goto return_label38;
- }
- variable3 = NEW_array___ArraySet___init(); /*new ArraySet[MMConcreteProperty]*/
- variable2 = variable3;
- variable4 = ((abstractmetamodel___MMLocalClass___che_t)CALL( variable0 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___che))( variable0 /*cla*/) /*MMLocalClass::che*/;
- variable3 = variable4;
- if (UNTAG_Bool( TAG_Bool(true))) { /*if*/
- variable4 = ((abstractmetamodel___MMLocalClass___che_t)CALL( variable0 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___che))( variable0 /*cla*/) /*MMLocalClass::che*/;
- variable4 = ((partial_order___PartialOrderElement___direct_greaters_t)CALL(variable4,COLOR_partial_order___PartialOrderElement___direct_greaters))(variable4) /*PartialOrderElement::direct_greaters*/;
- variable4 = ((array___AbstractArray___iterator_t)CALL(variable4,COLOR_abstract_collection___Collection___iterator))(variable4) /*Array::iterator*/;
- while (true) { /*for*/
- variable5 = ((array___ArrayIterator___is_ok_t)CALL(variable4,COLOR_abstract_collection___Iterator___is_ok))(variable4) /*ArrayIterator::is_ok*/;
- if (!UNTAG_Bool(variable5)) break; /*for*/
- variable5 = ((array___ArrayIterator___item_t)CALL(variable4,COLOR_abstract_collection___Iterator___item))(variable4) /*ArrayIterator::item*/;
- variable7 = ((inheritance___MMLocalClass_____bra_t)CALL( variable5 /*sc*/,COLOR_abstractmetamodel___MMLocalClass_____bra))( variable5 /*sc*/, self) /*MMLocalClass::[]*/;
- variable6 = variable7;
- variable7 = TAG_Bool(( variable6 /*p*/ == NIT_NULL /*null*/) || (( variable6 /*p*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable6 /*p*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable6 /*p*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable6 /*p*/,COLOR_kernel___Object_____eqeq))( variable6 /*p*/, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))));
- if (UNTAG_Bool(variable7)) { /*if*/
- goto continue_39;
+ 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;
}
- variable8 = ((abstractmetamodel___MMLocalProperty___concrete_property_t)CALL( variable6 /*p*/,COLOR_abstractmetamodel___MMLocalProperty___concrete_property))( variable6 /*p*/) /*MMLocalProperty::concrete_property*/;
- variable7 = variable8;
- ((array___ArraySet___add_t)CALL( variable2 /*impls*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*impls*/, variable7 /*impl*/) /*ArraySet::add*/;
- continue_39: while(0);
- ((array___ArrayIterator___next_t)CALL(variable4,COLOR_abstract_collection___Iterator___next))(variable4) /*ArrayIterator::next*/;
}
- break_39: while(0);
- } else { /*if*/
- variable4 = ((partial_order___PartialOrder___iterator_t)CALL( variable1 /*impl_hier*/,COLOR_abstract_collection___Collection___iterator))( variable1 /*impl_hier*/) /*PartialOrder::iterator*/;
- while (true) { /*for*/
- variable5 = ((abstract_collection___Iterator___is_ok_t)CALL(variable4,COLOR_abstract_collection___Iterator___is_ok))(variable4) /*Iterator::is_ok*/;
- if (!UNTAG_Bool(variable5)) break; /*for*/
- variable5 = ((abstract_collection___Iterator___item_t)CALL(variable4,COLOR_abstract_collection___Iterator___item))(variable4) /*Iterator::item*/;
- variable7 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL( variable5 /*impl*/,COLOR_abstractmetamodel___MMLocalProperty___local_class))( variable5 /*impl*/) /*MMConcreteProperty::local_class*/;
- variable6 = variable7;
- variable7 = ((partial_order___PartialOrderElement_____l_t)CALL( variable3 /*clache*/,COLOR_partial_order___PartialOrderElement_____l))( variable3 /*clache*/, variable6 /*bc*/) /*PartialOrderElement::<*/;
- if (UNTAG_Bool(variable7)) { /*if*/
- ((array___ArraySet___add_t)CALL( variable2 /*impls*/,COLOR_abstract_collection___SimpleCollection___add))( variable2 /*impls*/, variable5 /*impl*/) /*ArraySet::add*/;
+ 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;
+ }
+ }
+ label1: while(0);
+ /* ./metamodel//inheritance.nit:402 */
+ fra.me.REG[5] = CALL_partial_order___PartialOrder___select_smallests(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB0 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[5])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB0 = ATTR_array___AbstractArrayRead____length(fra.me.REG[5]);
+ /* ./metamodel//inheritance.nit:404 */
+ 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:404 */
+ REGB2 = REGB1;
+ }
+ REGB2 = TAG_Bool(!UNTAG_Bool(REGB2));
+ if (UNTAG_Bool(REGB2)) {
+ /* ./metamodel//inheritance.nit:405 */
+ fra.me.REG[2] = CALL_file___Object___stderr(fra.me.REG[0])(fra.me.REG[0]);
+ if (!once_value_2) {
+ fra.me.REG[6] = BOX_NativeString("Fatal error: inherit_local_property error\n");
+ REGB2 = TAG_Int(42);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_2 = fra.me.REG[6];
+ register_static_object(&once_value_2);
+ } else fra.me.REG[6] = once_value_2;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_stream___OStream___write(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+ /* ./metamodel//inheritance.nit:406 */
+ REGB2 = TAG_Int(7);
+ fra.me.REG[6] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_3) {
+ fra.me.REG[2] = BOX_NativeString("------- ");
+ REGB2 = TAG_Int(8);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_3 = fra.me.REG[2];
+ register_static_object(&once_value_3);
+ } else fra.me.REG[2] = once_value_3;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalClass___mmmodule(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+ if (!once_value_4) {
+ fra.me.REG[2] = BOX_NativeString("::");
+ REGB2 = TAG_Int(2);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_4 = fra.me.REG[2];
+ register_static_object(&once_value_4);
+ } else fra.me.REG[2] = once_value_4;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[0])(fra.me.REG[0]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+ if (!once_value_5) {
+ fra.me.REG[2] = BOX_NativeString(" ");
+ REGB2 = TAG_Int(1);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_5 = fra.me.REG[2];
+ register_static_object(&once_value_5);
+ } else fra.me.REG[2] = once_value_5;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMGlobalProperty___intro(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+ if (!once_value_6) {
+ fra.me.REG[2] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[2] = NEW_String_string___String___with_native(fra.me.REG[2], REGB2);
+ once_value_6 = fra.me.REG[2];
+ register_static_object(&once_value_6);
+ } else fra.me.REG[2] = once_value_6;
+ fra.me.REG[2] = fra.me.REG[2];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[6])(fra.me.REG[6], fra.me.REG[2]);
+ fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
+ CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[6]);
+ /* ./../lib/standard//collection//array.nit:231 */
+ fra.me.REG[6] = fra.me.REG[5];
+ /* ./../lib/standard//collection//array.nit:234 */
+ REGB2 = TAG_Int(0);
+ /* ./../lib/standard//collection//array.nit:235 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[6])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 235);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[6]);
+ /* ./../lib/standard//collection//array.nit:236 */
+ fra.me.REG[2] = ATTR_array___Array____items(fra.me.REG[6]);
+ /* ./../lib/standard//collection//array.nit:237 */
+ while(1) {
+ /* ./../lib/standard//collection//array.nit:23 */
+ REGB1 = TAG_Bool(ATTR_array___AbstractArrayRead____length(fra.me.REG[6])!=NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_length", LOCATE_array, 23);
+ }
+ REGB1 = ATTR_array___AbstractArrayRead____length(fra.me.REG[6]);
+ /* ./../lib/standard//kernel.nit:212 */
+ REGB1 = TAG_Bool(UNTAG_Int(REGB2)<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[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[3] = ((Nit_NativeArray)fra.me.REG[2])->val[UNTAG_Int(REGB2)];
+ /* ./metamodel//inheritance.nit:408 */
+ REGB1 = TAG_Int(3);
+ fra.me.REG[7] = NEW_Array_array___Array___with_capacity(REGB1);
+ if (!once_value_7) {
+ fra.me.REG[8] = BOX_NativeString(" ");
+ REGB1 = TAG_Int(3);
+ fra.me.REG[8] = NEW_String_string___String___with_native(fra.me.REG[8], REGB1);
+ once_value_7 = fra.me.REG[8];
+ register_static_object(&once_value_7);
+ } else fra.me.REG[8] = once_value_7;
+ fra.me.REG[8] = fra.me.REG[8];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[8]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalProperty___full_name(fra.me.REG[3])(fra.me.REG[3]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[3]);
+ if (!once_value_8) {
+ fra.me.REG[3] = BOX_NativeString("");
+ REGB1 = TAG_Int(0);
+ fra.me.REG[3] = NEW_String_string___String___with_native(fra.me.REG[3], REGB1);
+ once_value_8 = fra.me.REG[3];
+ register_static_object(&once_value_8);
+ } else fra.me.REG[3] = once_value_8;
+ fra.me.REG[3] = fra.me.REG[3];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[7])(fra.me.REG[7], fra.me.REG[3]);
+ fra.me.REG[7] = CALL_string___Object___to_s(fra.me.REG[7])(fra.me.REG[7]);
+ CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[7]);
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB1 = TAG_Int(1);
+ /* ./../lib/standard//kernel.nit:215 */
+ REGB1 = TAG_Int(UNTAG_Int(REGB2)+UNTAG_Int(REGB1));
+ /* ./../lib/standard//collection//array.nit:239 */
+ REGB2 = REGB1;
+ } else {
+ /* ./../lib/standard//collection//array.nit:237 */
+ goto label9;
+ }
+ }
+ label9: while(0);
+ /* ./metamodel//inheritance.nit:410 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_10) {
+ fra.me.REG[6] = BOX_NativeString("------- ");
+ REGB2 = TAG_Int(8);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_10 = fra.me.REG[6];
+ register_static_object(&once_value_10);
+ } else fra.me.REG[6] = once_value_10;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+ fra.me.REG[6] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[6] = CALL_abstract_collection___Collection___first(fra.me.REG[6])(fra.me.REG[6]);
+ fra.me.REG[6] = CALL_string___Object___to_s(fra.me.REG[6])(fra.me.REG[6]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+ if (!once_value_11) {
+ fra.me.REG[6] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_11 = fra.me.REG[6];
+ register_static_object(&once_value_11);
+ } else fra.me.REG[6] = once_value_11;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:411 */
+ REGB2 = TAG_Int(3);
+ fra.me.REG[2] = NEW_Array_array___Array___with_capacity(REGB2);
+ if (!once_value_12) {
+ fra.me.REG[6] = BOX_NativeString("------- ");
+ REGB2 = TAG_Int(8);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_12 = fra.me.REG[6];
+ register_static_object(&once_value_12);
+ } else fra.me.REG[6] = once_value_12;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+ fra.me.REG[6] = CALL_abstractmetamodel___MMGlobalProperty___property_hierarchy(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[6] = CALL_partial_order___PartialOrder___to_dot(fra.me.REG[6])(fra.me.REG[6]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+ if (!once_value_13) {
+ fra.me.REG[6] = BOX_NativeString("");
+ REGB2 = TAG_Int(0);
+ fra.me.REG[6] = NEW_String_string___String___with_native(fra.me.REG[6], REGB2);
+ once_value_13 = fra.me.REG[6];
+ register_static_object(&once_value_13);
+ } else fra.me.REG[6] = once_value_13;
+ fra.me.REG[6] = fra.me.REG[6];
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[6]);
+ fra.me.REG[2] = CALL_string___Object___to_s(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_file___Object___print(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:412 */
+ REGB2 = TAG_Int(1);
+ CALL_kernel___Object___exit(fra.me.REG[0])(fra.me.REG[0], REGB2);
}
- continue_40: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable4,COLOR_abstract_collection___Iterator___next))(variable4) /*Iterator::next*/;
+ /* ./metamodel//inheritance.nit:414 */
+ fra.me.REG[5] = CALL_abstract_collection___Collection___first(fra.me.REG[5])(fra.me.REG[5]);
+ fra.me.REG[4] = fra.me.REG[5];
}
- break_40: while(0);
- }
- variable4 = ((partial_order___PartialOrder___select_smallests_t)CALL( variable1 /*impl_hier*/,COLOR_partial_order___PartialOrder___select_smallests))( variable1 /*impl_hier*/, variable2 /*impls*/) /*PartialOrder::select_smallests*/;
- variable1 = variable4;
- goto return_label38;
- return_label38: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-void inheritance___MMLocalProperty___inherit_global(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalProperty::inherit_global (src/metamodel//inheritance.nit:378,2--383:97)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- ((abstractmetamodel___MMLocalProperty___set_global_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___set_global))( self, variable0 /*g*/) /*MMLocalProperty::set_global*/;
- variable1 = ((abstractmetamodel___MMLocalProperty___concrete_property_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___concrete_property))( self) /*MMLocalProperty::concrete_property*/;
- variable2 = ((abstractmetamodel___MMLocalProperty___local_class_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___local_class))( self) /*MMLocalProperty::local_class*/;
- variable2 = ((inheritance___MMGlobalProperty___get_compatible_concrete_properties_for_t)CALL( variable0 /*g*/,COLOR_inheritance___MMGlobalProperty___get_compatible_concrete_properties_for))( variable0 /*g*/, variable2) /*MMGlobalProperty::get_compatible_concrete_properties_for*/;
- ((abstractmetamodel___MMGlobalProperty___add_concrete_property_t)CALL( variable0 /*g*/,COLOR_abstractmetamodel___MMGlobalProperty___add_concrete_property))( variable0 /*g*/, variable1, variable2) /*MMGlobalProperty::add_concrete_property*/;
- tracehead = trace.prev;
- return;
-}
-val_t inheritance___MMLocalProperty___inherit_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMLocalProperty::inherit_to (src/metamodel//inheritance.nit:386,2--387:44)"};
- trace.prev = tracehead; tracehead = &trace;
- fprintf(stderr, "Deferred method inherit_to called (src/metamodel//inheritance.nit:386,2)\n");
- nit_exit(1);
- tracehead = trace.prev;
- return NIT_NULL;
-}
-void inheritance___MMLocalProperty___inherit_from(val_t self, val_t param0, val_t param1) {
- struct trace_t trace = {NULL, "inheritance::MMLocalProperty::inherit_from (src/metamodel//inheritance.nit:389,2--395:22)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- variable2 = ATTR_abstractmetamodel___MMLocalProperty____super_prop( self) /*MMLocalProperty::_super_prop*/;
- variable2 = TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*MMLocalProperty::==*/)))));
- if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:392,3--28\n"); nit_exit(1);}
- ATTR_abstractmetamodel___MMLocalProperty____super_prop( self) /*MMLocalProperty::_super_prop*/ = variable0 /*s*/;
- variable2 = ATTR_abstractmetamodel___MMLocalProperty____global( self) /*MMLocalProperty::_global*/;
- variable2 = TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*MMGlobalProperty::==*/)))));
- if (UNTAG_Bool(variable2)) { /*if*/
- variable2 = ((abstractmetamodel___MMLocalProperty___global_t)CALL( variable0 /*s*/,COLOR_abstractmetamodel___MMLocalProperty___global))( variable0 /*s*/) /*MMLocalProperty::global*/;
- ((abstractmetamodel___MMLocalProperty___set_global_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___set_global))( self, variable2) /*MMLocalProperty::set_global*/;
- }
- tracehead = trace.prev;
- return;
-}
-val_t inheritance___MMMethod___inherit_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMMethod::inherit_to (src/metamodel//inheritance.nit:402,2--403:37)"};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = NEW_inheritance___MMImplicitMethod___init( self, variable0 /*t*/); /*new MMImplicitMethod*/
- goto return_label43;
- return_label43: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-void inheritance___MMImplicitProperty___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, "inheritance::MMImplicitProperty::init (src/metamodel//inheritance.nit:410,2--414:23)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitProperty].i]) return;
- variable2 = ((abstractmetamodel___MMLocalProperty___name_t)CALL( variable0 /*prop*/,COLOR_abstractmetamodel___MMLocalProperty___name))( variable0 /*prop*/) /*MMLocalProperty::name*/;
- variable3 = ((static_type___MMType___local_class_t)CALL( variable1 /*bt*/,COLOR_static_type___MMType___local_class))( variable1 /*bt*/) /*MMType::local_class*/;
- variable4 = ((abstractmetamodel___MMLocalProperty___concrete_property_t)CALL( variable0 /*prop*/,COLOR_abstractmetamodel___MMLocalProperty___concrete_property))( variable0 /*prop*/) /*MMLocalProperty::concrete_property*/;
- ((abstractmetamodel___MMLocalProperty___init_t)CALL( self,COLOR_abstractmetamodel___MMLocalProperty___init))( self, variable2, variable3, variable4, init_table /*YYY*/) /*MMLocalProperty::init*/;
- ((inheritance___MMLocalProperty___inherit_from_t)CALL( self,COLOR_inheritance___MMLocalProperty___inherit_from))( self, variable0 /*prop*/, variable1 /*bt*/) /*MMImplicitProperty::inherit_from*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitProperty].i] = 1;
- tracehead = trace.prev;
- return;
+ }
+ /* ./metamodel//inheritance.nit:424 */
+ REGB2 = TAG_Bool(ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB2)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_local_property_by_global", LOCATE_inheritance, 424);
+ }
+ fra.me.REG[0] = ATTR_abstractmetamodel___MMLocalClass____local_property_by_global(fra.me.REG[0]);
+ CALL_abstract_collection___Map_____braeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[4]);
+ /* ./metamodel//inheritance.nit:426 */
+ goto label14;
+ label14: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[4];
}
-void inheritance___MMImplicitMethod___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, "inheritance::MMImplicitMethod::init (src/metamodel//inheritance.nit:421,2--20)"};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitMethod].i]) return;
- ((inheritance___MMImplicitProperty___init_t)CALL( self,COLOR_inheritance___MMImplicitProperty___init))( self, param0, param1, init_table /*YYY*/) /*MMImplicitProperty::init*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitMethod].i] = 1;
- tracehead = trace.prev;
+void inheritance___MMLocalProperty___inherit_global(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
+ val_t REGB0;
+ val_t REGB1;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 431;
+ fra.me.meth = LOCATE_inheritance___MMLocalProperty___inherit_global;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:434 */
+ CALL_abstractmetamodel___MMLocalProperty___set_global(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:435 */
+ fra.me.REG[2] = NEW_Array_array___Array___init();
+ /* ./metamodel//inheritance.nit:436 */
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalProperty___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_abstractmetamodel___MMLocalClass___che(fra.me.REG[3])(fra.me.REG[3]);
+ fra.me.REG[3] = CALL_partial_order___PartialOrderElement___direct_greaters(fra.me.REG[3])(fra.me.REG[3]);
+ /* ./../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[4] = 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[4]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_array, 238);
+ }
+ /* ./../lib/standard//collection//array.nit:654 */
+ fra.me.REG[5] = ((Nit_NativeArray)fra.me.REG[4])->val[UNTAG_Int(REGB0)];
+ /* ./metamodel//inheritance.nit:437 */
+ REGB1 = CALL_abstractmetamodel___MMLocalClass___has_global_property(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1]);
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ if (UNTAG_Bool(REGB1)) {
+ goto label1;
+ }
+ /* ./metamodel//inheritance.nit:438 */
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass_____bra(fra.me.REG[5])(fra.me.REG[5], fra.me.REG[1]);
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[2])(fra.me.REG[2], fra.me.REG[5]);
+ label1: while(0);
+ /* ./../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 label2;
+ }
+ }
+ label2: while(0);
+ /* ./metamodel//inheritance.nit:440 */
+ CALL_abstractmetamodel___MMGlobalProperty___add_local_property(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0], fra.me.REG[2]);
+ stack_frame_head = fra.me.prev;
return;
}
-val_t inheritance___MMAttribute___inherit_to(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMAttribute::inherit_to (src/metamodel//inheritance.nit:425,2--427:39)"};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = NEW_inheritance___MMImplicitAttribute___init( self, variable0 /*t*/); /*new MMImplicitAttribute*/
- goto return_label46;
- return_label46: while(false);
- tracehead = trace.prev;
- return variable1;
-}
-void inheritance___MMImplicitAttribute___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, "inheritance::MMImplicitAttribute::init (src/metamodel//inheritance.nit:434,2--20)"};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitAttribute].i]) return;
- ((inheritance___MMImplicitProperty___init_t)CALL( self,COLOR_inheritance___MMImplicitProperty___init))( self, param0, param1, init_table /*YYY*/) /*MMImplicitProperty::init*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitAttribute].i] = 1;
- tracehead = trace.prev;
+void inheritance___MMAncestor___add_in(val_t p0, val_t p1){
+ struct {struct stack_frame_t me; val_t MORE_REG[2];} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 445;
+ fra.me.meth = LOCATE_inheritance___MMAncestor___add_in;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 3;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[1] = NIT_NULL;
+ fra.me.REG[2] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ /* ./metamodel//inheritance.nit:448 */
+ CALL_abstract_collection___SimpleCollection___add(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ /* ./metamodel//inheritance.nit:449 */
+ fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[2])(fra.me.REG[2]);
+ CALL_inheritance___MMLocalClass___compute_ancestors(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:450 */
+ fra.me.REG[2] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[2])(fra.me.REG[2]);
+ fra.me.REG[2] = CALL_static_type___MMLocalClass___ancestors(fra.me.REG[2])(fra.me.REG[2]);
+ REGB0 = TAG_Bool((fra.me.REG[2]!=NIT_NULL) && VAL_ISA(fra.me.REG[2], COLOR_Map, ID_Map)) /*cast Map[MMLocalClass, MMAncestor]*/;
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Cast failed", NULL, LOCATE_inheritance, 450);
+ }
+ REGB0 = TAG_Bool(fra.me.REG[2]==NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 450);
+ }
+ CALL_abstract_collection___Collection___iterate(fra.me.REG[2])(fra.me.REG[2], (&(fra.me)), ((fun_t)OC_inheritance___MMAncestor___add_in_1));
+ stack_frame_head = fra.me.prev;
return;
}
-void inheritance___MMAncestor___add_in(val_t self, val_t param0) {
- struct trace_t trace = {NULL, "inheritance::MMAncestor::add_in (src/metamodel//inheritance.nit:438,2--456:43)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- val_t variable5;
- val_t variable6;
- val_t variable7;
- val_t variable8;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
- variable1 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable1 == NIT_NULL /*null*/) || ((variable1 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable1, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable1,COLOR_kernel___Object_____eqeq))(variable1, NIT_NULL /*null*/) /*MMType::==*/)))))));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert 'ancestor' failed: src/metamodel//inheritance.nit:441,3--32\n"); nit_exit(1);}
- variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
- variable1 = ((static_type___MMType___local_class_t)CALL(variable1,COLOR_static_type___MMType___local_class))(variable1) /*MMType::local_class*/;
- 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::==*/)))))));
- if (!UNTAG_Bool(variable1)) { fprintf(stderr, "Assert 'local_class' failed: src/metamodel//inheritance.nit:442,3--47\n"); nit_exit(1);}
- ((array___AbstractArray___add_t)CALL( variable0 /*tab*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*tab*/, self) /*Array::add*/;
- variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
- variable1 = ((static_type___MMType___local_class_t)CALL(variable1,COLOR_static_type___MMType___local_class))(variable1) /*MMType::local_class*/;
- ((inheritance___MMLocalClass___compute_ancestors_t)CALL(variable1,COLOR_inheritance___MMLocalClass___compute_ancestors))(variable1) /*MMLocalClass::compute_ancestors*/;
- variable1 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
- variable1 = ((static_type___MMType___local_class_t)CALL(variable1,COLOR_static_type___MMType___local_class))(variable1) /*MMType::local_class*/;
- variable1 = ((static_type___MMLocalClass___ancestors_t)CALL(variable1,COLOR_static_type___MMLocalClass___ancestors))(variable1) /*MMLocalClass::ancestors*/;
- variable1 = ((abstract_collection___Map___iterator_t)CALL(variable1,COLOR_abstract_collection___Collection___iterator))(variable1) /*Map::iterator*/;
- while (true) { /*for*/
- variable2 = ((abstract_collection___Iterator___is_ok_t)CALL(variable1,COLOR_abstract_collection___Iterator___is_ok))(variable1) /*MapIterator::is_ok*/;
- if (!UNTAG_Bool(variable2)) break; /*for*/
- variable2 = ((abstract_collection___Iterator___item_t)CALL(variable1,COLOR_abstract_collection___Iterator___item))(variable1) /*MapIterator::item*/;
- variable4 = ((static_type___MMAncestor___stype_t)CALL( variable2 /*anc*/,COLOR_static_type___MMAncestor___stype))( variable2 /*anc*/) /*MMAncestor::stype*/;
- variable5 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
- variable5 = ((static_type___MMType___module_t)CALL(variable5,COLOR_static_type___MMType___module))(variable5) /*MMType::module*/;
- variable4 = ((static_type___MMType___for_module_t)CALL(variable4,COLOR_static_type___MMType___for_module))(variable4, variable5) /*MMType::for_module*/;
- variable3 = variable4;
- variable5 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMAncestor::stype*/;
- variable5 = ((static_type___MMType___adapt_to_t)CALL( variable3 /*aaa*/,COLOR_static_type___MMType___adapt_to))( variable3 /*aaa*/, variable5) /*MMType::adapt_to*/;
- variable6 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
- variable6 = ((static_type___MMType___module_t)CALL(variable6,COLOR_static_type___MMType___module))(variable6) /*MMType::module*/;
- variable5 = ((static_type___MMType___for_module_t)CALL(variable5,COLOR_static_type___MMType___for_module))(variable5, variable6) /*MMType::for_module*/;
- variable4 = variable5;
- variable5 = ((static_type___MMType___local_class_t)CALL( variable4 /*a*/,COLOR_static_type___MMType___local_class))( variable4 /*a*/) /*MMType::local_class*/;
- variable6 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
- variable6 = ((static_type___MMType___local_class_t)CALL(variable6,COLOR_static_type___MMType___local_class))(variable6) /*MMType::local_class*/;
- variable5 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable5 == variable6) || ((variable5 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable5,variable6)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable5,COLOR_kernel___Object_____eqeq))(variable5, variable6) /*MMLocalClass::==*/)))))));
- if (UNTAG_Bool(variable5)) { /*if*/
- variable6 = ((array___AbstractArray___iterator_t)CALL( variable0 /*tab*/,COLOR_abstract_collection___Collection___iterator))( variable0 /*tab*/) /*Array::iterator*/;
- variable5 = variable6;
- variable6 = TAG_Bool(true);
- while (true) { /*while*/
- variable7 = ((array___ArrayIterator___is_ok_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___is_ok))( variable5 /*it*/) /*ArrayIterator::is_ok*/;
- variable8 = variable7;
- if (UNTAG_Bool(variable8)) { /* and */
- variable8 = variable6 /*b*/;
+ void OC_inheritance___MMAncestor___add_in_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;
+ 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___MMAncestor___add_in;
+ 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:451 */
+ fra.me.REG[0] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[1] = CALL_static_type___MMAncestor___stype(closctx->REG[0])(closctx->REG[0]);
+ fra.me.REG[1] = CALL_static_type___MMType___mmmodule(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[1] = CALL_static_type___MMType___for_module(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:452 */
+ fra.me.REG[0] = CALL_static_type___MMAncestor___stype(closctx->REG[0])(closctx->REG[0]);
+ fra.me.REG[0] = CALL_static_type___MMType___adapt_to(fra.me.REG[1])(fra.me.REG[1], fra.me.REG[0]);
+ fra.me.REG[1] = CALL_static_type___MMAncestor___inheriter(closctx->REG[0])(closctx->REG[0]);
+ fra.me.REG[1] = CALL_static_type___MMType___mmmodule(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[1] = CALL_static_type___MMType___for_module(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:453 */
+ fra.me.REG[0] = CALL_static_type___MMType___local_class(fra.me.REG[1])(fra.me.REG[1]);
+ fra.me.REG[2] = CALL_static_type___MMAncestor___inheriter(closctx->REG[0])(closctx->REG[0]);
+ fra.me.REG[2] = CALL_static_type___MMType___local_class(fra.me.REG[2])(fra.me.REG[2]);
+ REGB0 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[0],fra.me.REG[2]));
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ REGB1 = CALL_kernel___Object_____eqeq(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[2]);
+ REGB0 = REGB1;
+ }
+ REGB0 = TAG_Bool(!UNTAG_Bool(REGB0));
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:454 */
+ fra.me.REG[2] = CALL_abstract_collection___Collection___iterator(closctx->REG[1])(closctx->REG[1]);
+ /* ./metamodel//inheritance.nit:455 */
+ REGB0 = TAG_Bool(true);
+ /* ./metamodel//inheritance.nit:456 */
+ while(1) {
+ REGB1 = CALL_abstract_collection___Iterator___is_ok(fra.me.REG[2])(fra.me.REG[2]);
+ if (UNTAG_Bool(REGB1)) {
+ REGB1 = REGB0;
+ } else {
+ REGB2 = TAG_Bool(false);
+ REGB1 = REGB2;
}
- variable7 = variable8;
- if (!UNTAG_Bool(variable7)) break; /* while*/
- variable7 = ((array___ArrayIterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*ArrayIterator::item*/;
- variable7 = ((static_type___MMAncestor___inheriter_t)CALL(variable7,COLOR_static_type___MMAncestor___inheriter))(variable7) /*MMAncestor::inheriter*/;
- variable8 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
- variable7 = TAG_Bool((variable7 == variable8) || ((variable7 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable7,variable8)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable7,COLOR_kernel___Object_____eqeq))(variable7, variable8) /*MMType::==*/)))));
- variable8 = variable7;
- if (UNTAG_Bool(variable8)) { /* and */
- variable8 = ((array___ArrayIterator___item_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___item))( variable5 /*it*/) /*ArrayIterator::item*/;
- variable8 = ((static_type___MMAncestor___stype_t)CALL(variable8,COLOR_static_type___MMAncestor___stype))(variable8) /*MMAncestor::stype*/;
- variable8 = TAG_Bool((variable8 == variable4 /*a*/) || ((variable8 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable8,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable8, variable4 /*a*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable8,COLOR_kernel___Object_____eqeq))(variable8, variable4 /*a*/) /*MMType::==*/)))));
+ if (UNTAG_Bool(REGB1)) {
+ /* ./metamodel//inheritance.nit:457 */
+ fra.me.REG[0] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
+ REGB1 = TAG_Bool(fra.me.REG[0]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 457);
+ }
+ fra.me.REG[0] = CALL_static_type___MMAncestor___inheriter(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[3] = CALL_static_type___MMAncestor___inheriter(closctx->REG[0])(closctx->REG[0]);
+ REGB1 = TAG_Bool(IS_EQUAL_OO(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)) {
+ fra.me.REG[3] = CALL_abstract_collection___Iterator___item(fra.me.REG[2])(fra.me.REG[2]);
+ REGB1 = TAG_Bool(fra.me.REG[3]==NIT_NULL);
+ if (UNTAG_Bool(REGB1)) {
+ nit_abort("Reciever is null", NULL, LOCATE_inheritance, 457);
+ }
+ fra.me.REG[3] = CALL_static_type___MMAncestor___stype(fra.me.REG[3])(fra.me.REG[3]);
+ REGB1 = TAG_Bool(IS_EQUAL_OO(fra.me.REG[3],fra.me.REG[1]));
+ if (UNTAG_Bool(REGB1)) {
+ } else {
+ REGB2 = CALL_kernel___Object_____eqeq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
+ REGB1 = REGB2;
+ }
+ } else {
+ REGB2 = TAG_Bool(false);
+ REGB1 = REGB2;
+ }
+ REGB1 = TAG_Bool(!UNTAG_Bool(REGB1));
+ REGB0 = REGB1;
+ /* ./metamodel//inheritance.nit:458 */
+ CALL_abstract_collection___Iterator___next(fra.me.REG[2])(fra.me.REG[2]);
+ } else {
+ /* ./metamodel//inheritance.nit:456 */
+ goto label2;
}
- variable7 = variable8;
- variable6 = TAG_Bool(!UNTAG_Bool(variable7)) /*b=*/;
- ((array___ArrayIterator___next_t)CALL( variable5 /*it*/,COLOR_abstract_collection___Iterator___next))( variable5 /*it*/) /*ArrayIterator::next*/;
- continue_50: while(0);
}
- break_50: while(0);
- if (UNTAG_Bool( variable6 /*b*/)) { /*if*/
- variable7 = ((static_type___MMAncestor___inheriter_t)CALL( self,COLOR_static_type___MMAncestor___inheriter))( self) /*MMAncestor::inheriter*/;
- variable8 = NEW_inheritance___MMSpecAncestor___init(variable7, variable4 /*a*/); /*new MMSpecAncestor*/
- variable7 = variable8;
- ((array___AbstractArray___add_t)CALL( variable0 /*tab*/,COLOR_abstract_collection___SimpleCollection___add))( variable0 /*tab*/, variable7) /*Array::add*/;
+ label2: while(0);
+ /* ./metamodel//inheritance.nit:460 */
+ if (UNTAG_Bool(REGB0)) {
+ /* ./metamodel//inheritance.nit:461 */
+ fra.me.REG[2] = CALL_static_type___MMAncestor___inheriter(closctx->REG[0])(closctx->REG[0]);
+ fra.me.REG[1] = NEW_MMSpecAncestor_inheritance___MMSpecAncestor___init(fra.me.REG[2], fra.me.REG[1]);
+ CALL_abstract_collection___SimpleCollection___add(closctx->REG[1])(closctx->REG[1], fra.me.REG[1]);
}
}
- continue_49: while(0);
- ((abstract_collection___Iterator___next_t)CALL(variable1,COLOR_abstract_collection___Iterator___next))(variable1) /*MapIterator::next*/;
+ stack_frame_head = fra.me.prev;
+ return;
}
- break_49: while(0);
- tracehead = trace.prev;
- return;
-}
-void inheritance___MMImplicitLocalClass___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, "inheritance::MMImplicitLocalClass::init (src/metamodel//inheritance.nit:468,2--473:14)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- val_t variable3;
- val_t variable4;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitLocalClass].i]) return;
- variable3 = ((abstractmetamodel___MMGlobalClass___intro_t)CALL( variable1 /*g*/,COLOR_abstractmetamodel___MMGlobalClass___intro))( variable1 /*g*/) /*MMGlobalClass::intro*/;
- variable2 = variable3;
- variable3 = ((abstractmetamodel___MMLocalClass___name_t)CALL( variable2 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___name))( variable2 /*cla*/) /*MMLocalClass::name*/;
- variable4 = ((abstractmetamodel___MMLocalClass___arity_t)CALL( variable2 /*cla*/,COLOR_abstractmetamodel___MMLocalClass___arity))( variable2 /*cla*/) /*MMLocalClass::arity*/;
- ((abstractmetamodel___MMLocalClass___init_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___init))( self, variable3, variable4, init_table /*YYY*/) /*MMLocalClass::init*/;
- ((abstractmetamodel___MMModule___add_local_class_t)CALL( variable0 /*mod*/,COLOR_abstractmetamodel___MMModule___add_local_class))( variable0 /*mod*/, self) /*MMModule::add_local_class*/;
- ((abstractmetamodel___MMLocalClass___set_global_t)CALL( self,COLOR_abstractmetamodel___MMLocalClass___set_global))( self, variable1 /*g*/) /*MMImplicitLocalClass::set_global*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMImplicitLocalClass].i] = 1;
- tracehead = trace.prev;
+void inheritance___MMImplicitLocalClass___init(val_t p0, val_t p1, val_t p2, int* init_table){
+ int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMImplicitLocalClass].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[5];} fra;
+ val_t REGB0;
+ val_t tmp;
+ if (init_table[itpos0]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 473;
+ fra.me.meth = LOCATE_inheritance___MMImplicitLocalClass___init;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 6;
+ 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[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./metamodel//inheritance.nit:473 */
+ fra.me.REG[3] = fra.me.REG[0];
+ /* ./metamodel//inheritance.nit:475 */
+ fra.me.REG[4] = CALL_abstractmetamodel___MMGlobalClass___intro(fra.me.REG[2])(fra.me.REG[2]);
+ /* ./metamodel//inheritance.nit:476 */
+ fra.me.REG[5] = CALL_abstractmetamodel___MMLocalClass___name(fra.me.REG[4])(fra.me.REG[4]);
+ REGB0 = CALL_abstractmetamodel___MMLocalClass___arity(fra.me.REG[4])(fra.me.REG[4]);
+ CALL_abstractmetamodel___MMLocalClass___init(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[5], REGB0, init_table);
+ /* ./metamodel//inheritance.nit:477 */
+ CALL_abstractmetamodel___MMLocalClass___set_global(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos0] = 1;
return;
}
-val_t inheritance___MMRefineAncestor___local_class(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMRefineAncestor::local_class (src/metamodel//inheritance.nit:479,2--47)"};
- trace.prev = tracehead; tracehead = &trace;
- tracehead = trace.prev;
- return ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/;
+val_t inheritance___MMRefineAncestor___local_class(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t REGB0;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 483;
+ fra.me.meth = LOCATE_inheritance___MMRefineAncestor___local_class;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:483 */
+ REGB0 = TAG_Bool(ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[0])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_local_class", LOCATE_inheritance, 483);
+ }
+ fra.me.REG[0] = ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[0]);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-void inheritance___MMRefineAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, "inheritance::MMRefineAncestor::init (src/metamodel//inheritance.nit:481,2--485:31)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMRefineAncestor].i]) return;
- ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/ = variable1 /*a*/;
- variable2 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*b*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*b*/) /*MMLocalClass::get_type*/;
- ((static_type___MMAncestor___inheriter__eq_t)CALL( self,COLOR_static_type___MMAncestor___inheriter__eq))( self, variable2) /*MMRefineAncestor::inheriter=*/;
- variable2 = ATTR_inheritance___MMRefineAncestor____local_class( self) /*MMRefineAncestor::_local_class*/;
- variable2 = ((static_type___MMLocalClass___get_type_t)CALL(variable2,COLOR_static_type___MMLocalClass___get_type))(variable2) /*MMLocalClass::get_type*/;
- ((static_type___MMAncestor___stype__eq_t)CALL( self,COLOR_static_type___MMAncestor___stype__eq))( self, variable2) /*MMRefineAncestor::stype=*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMRefineAncestor].i] = 1;
- tracehead = trace.prev;
+void inheritance___MMRefineAncestor___init(val_t p0, val_t p1, val_t p2, int* init_table){
+ int itpos1 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMRefineAncestor].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t REGB0;
+ val_t tmp;
+ if (init_table[itpos1]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 485;
+ fra.me.meth = LOCATE_inheritance___MMRefineAncestor___init;
+ 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.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./metamodel//inheritance.nit:485 */
+ fra.me.REG[3] = fra.me.REG[0];
+ CALL_static_type___MMAncestor___init(fra.me.REG[0])(fra.me.REG[0], init_table);
+ /* ./metamodel//inheritance.nit:487 */
+ ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[3]) = fra.me.REG[2];
+ /* ./metamodel//inheritance.nit:488 */
+ fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
+ CALL_static_type___MMAncestor___inheriter__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:489 */
+ REGB0 = TAG_Bool(ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[3])!=NIT_NULL);
+ if (UNTAG_Bool(REGB0)) {
+ } else {
+ nit_abort("Uninitialized attribute %s", "_local_class", LOCATE_inheritance, 489);
+ }
+ fra.me.REG[1] = ATTR_inheritance___MMRefineAncestor____local_class(fra.me.REG[3]);
+ fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
+ CALL_static_type___MMAncestor___stype__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos1] = 1;
return;
}
-val_t inheritance___MMSpecAncestor___local_class(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMSpecAncestor::local_class (src/metamodel//inheritance.nit:492,2--51)"};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMSpecAncestor::stype*/;
- variable0 = ((static_type___MMType___local_class_t)CALL(variable0,COLOR_static_type___MMType___local_class))(variable0) /*MMType::local_class*/;
- goto return_label53;
- return_label53: while(false);
- tracehead = trace.prev;
- return variable0;
+val_t inheritance___MMSpecAncestor___local_class(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 496;
+ fra.me.meth = LOCATE_inheritance___MMSpecAncestor___local_class;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:496 */
+ fra.me.REG[0] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_static_type___MMType___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-void inheritance___MMSpecAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, "inheritance::MMSpecAncestor::init (src/metamodel//inheritance.nit:494,2--497:16)"};
- val_t variable0;
- val_t variable1;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMSpecAncestor].i]) return;
- ATTR_static_type___MMAncestor____inheriter( self) /*MMSpecAncestor::_inheriter*/ = variable0 /*inheriter*/;
- ATTR_static_type___MMAncestor____stype( self) /*MMSpecAncestor::_stype*/ = variable1 /*stype*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMSpecAncestor].i] = 1;
- tracehead = trace.prev;
+void inheritance___MMSpecAncestor___init(val_t p0, val_t p1, val_t p2, int* init_table){
+ int itpos2 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMSpecAncestor].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t tmp;
+ if (init_table[itpos2]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 498;
+ fra.me.meth = LOCATE_inheritance___MMSpecAncestor___init;
+ 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.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./metamodel//inheritance.nit:498 */
+ fra.me.REG[3] = fra.me.REG[0];
+ CALL_static_type___MMAncestor___init(fra.me.REG[0])(fra.me.REG[0], init_table);
+ /* ./metamodel//inheritance.nit:500 */
+ ATTR_static_type___MMAncestor____inheriter(fra.me.REG[3]) = fra.me.REG[1];
+ /* ./metamodel//inheritance.nit:501 */
+ ATTR_static_type___MMAncestor____stype(fra.me.REG[3]) = fra.me.REG[2];
+ stack_frame_head = fra.me.prev;
+ init_table[itpos2] = 1;
return;
}
-val_t inheritance___MMDefaultAncestor___local_class(val_t self) {
- struct trace_t trace = {NULL, "inheritance::MMDefaultAncestor::local_class (src/metamodel//inheritance.nit:503,2--51)"};
- val_t variable0;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = ((static_type___MMAncestor___stype_t)CALL( self,COLOR_static_type___MMAncestor___stype))( self) /*MMDefaultAncestor::stype*/;
- variable0 = ((static_type___MMType___local_class_t)CALL(variable0,COLOR_static_type___MMType___local_class))(variable0) /*MMType::local_class*/;
- goto return_label55;
- return_label55: while(false);
- tracehead = trace.prev;
- return variable0;
+val_t inheritance___MMDefaultAncestor___local_class(val_t p0){
+ struct {struct stack_frame_t me;} fra;
+ val_t tmp;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 507;
+ fra.me.meth = LOCATE_inheritance___MMDefaultAncestor___local_class;
+ fra.me.has_broke = 0;
+ fra.me.REG_size = 1;
+ fra.me.REG[0] = NIT_NULL;
+ fra.me.REG[0] = p0;
+ /* ./metamodel//inheritance.nit:507 */
+ fra.me.REG[0] = CALL_static_type___MMAncestor___stype(fra.me.REG[0])(fra.me.REG[0]);
+ fra.me.REG[0] = CALL_static_type___MMType___local_class(fra.me.REG[0])(fra.me.REG[0]);
+ goto label1;
+ label1: while(0);
+ stack_frame_head = fra.me.prev;
+ return fra.me.REG[0];
}
-void inheritance___MMDefaultAncestor___init(val_t self, val_t param0, val_t param1, int* init_table) {
- struct trace_t trace = {NULL, "inheritance::MMDefaultAncestor::init (src/metamodel//inheritance.nit:505,2--511:13)"};
- val_t variable0;
- val_t variable1;
- val_t variable2;
- trace.prev = tracehead; tracehead = &trace;
- variable0 = param0;
- variable1 = param1;
- if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMDefaultAncestor].i]) return;
- variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable0 /*b*/ == NIT_NULL /*null*/) || (( variable0 /*b*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable0 /*b*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable0 /*b*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable0 /*b*/,COLOR_kernel___Object_____eqeq))( variable0 /*b*/, NIT_NULL /*null*/) /*MMLocalClass::==*/)))))));
- if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:507,3--18\n"); nit_exit(1);}
- variable2 = ((abstractmetamodel___MMLocalClass___module_t)CALL( variable0 /*b*/,COLOR_abstractmetamodel___MMLocalClass___module))( variable0 /*b*/) /*MMLocalClass::module*/;
- variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool((variable2 == NIT_NULL /*null*/) || ((variable2 != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN(variable2, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL(variable2,COLOR_kernel___Object_____eqeq))(variable2, NIT_NULL /*null*/) /*MMModule::==*/)))))));
- if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:508,3--25\n"); nit_exit(1);}
- variable2 = TAG_Bool(!UNTAG_Bool(TAG_Bool(( variable1 /*anc*/ == NIT_NULL /*null*/) || (( variable1 /*anc*/ != NIT_NULL) && ((((kernel___Object_____eqeq_t)CALL( variable1 /*anc*/,COLOR_kernel___Object_____eqeq))==kernel___Object_____eqeq)?(IS_EQUAL_NN( variable1 /*anc*/, NIT_NULL /*null*/)):(UNTAG_Bool(((kernel___Object_____eqeq_t)CALL( variable1 /*anc*/,COLOR_kernel___Object_____eqeq))( variable1 /*anc*/, NIT_NULL /*null*/) /*MMType::==*/)))))));
- if (!UNTAG_Bool(variable2)) { fprintf(stderr, "Assert failed: src/metamodel//inheritance.nit:509,3--20\n"); nit_exit(1);}
- variable2 = ((static_type___MMLocalClass___get_type_t)CALL( variable0 /*b*/,COLOR_static_type___MMLocalClass___get_type))( variable0 /*b*/) /*MMLocalClass::get_type*/;
- ((static_type___MMAncestor___inheriter__eq_t)CALL( self,COLOR_static_type___MMAncestor___inheriter__eq))( self, variable2) /*MMDefaultAncestor::inheriter=*/;
- ((static_type___MMAncestor___stype__eq_t)CALL( self,COLOR_static_type___MMAncestor___stype__eq))( self, variable1 /*anc*/) /*MMDefaultAncestor::stype=*/;
- init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMDefaultAncestor].i] = 1;
- tracehead = trace.prev;
+void inheritance___MMDefaultAncestor___init(val_t p0, val_t p1, val_t p2, int* init_table){
+ int itpos3 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMDefaultAncestor].i;
+ struct {struct stack_frame_t me; val_t MORE_REG[3];} fra;
+ val_t tmp;
+ if (init_table[itpos3]) return;
+ fra.me.prev = stack_frame_head; stack_frame_head = &fra.me;
+ fra.me.file = LOCATE_inheritance;
+ fra.me.line = 509;
+ fra.me.meth = LOCATE_inheritance___MMDefaultAncestor___init;
+ 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.REG[0] = p0;
+ fra.me.REG[1] = p1;
+ fra.me.REG[2] = p2;
+ /* ./metamodel//inheritance.nit:509 */
+ fra.me.REG[3] = fra.me.REG[0];
+ CALL_static_type___MMAncestor___init(fra.me.REG[0])(fra.me.REG[0], init_table);
+ /* ./metamodel//inheritance.nit:511 */
+ fra.me.REG[1] = CALL_static_type___MMLocalClass___get_type(fra.me.REG[1])(fra.me.REG[1]);
+ CALL_static_type___MMAncestor___inheriter__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[1]);
+ /* ./metamodel//inheritance.nit:512 */
+ CALL_static_type___MMAncestor___stype__eq(fra.me.REG[3])(fra.me.REG[3], fra.me.REG[2]);
+ stack_frame_head = fra.me.prev;
+ init_table[itpos3] = 1;
return;
}