X-Git-Url: http://nitlanguage.org diff --git a/c_src/vararg._sep.c b/c_src/vararg._sep.c index cfde9ba..3ea3975 100644 --- a/c_src/vararg._sep.c +++ b/c_src/vararg._sep.c @@ -1,60 +1,170 @@ +/* This C file is generated by NIT to compile module vararg. */ #include "vararg._sep.h" -val_t vararg___MMSignature___vararg_rank(val_t self) { - struct trace_t trace = {NULL, "vararg::MMSignature::vararg_rank (src/metamodel//vararg.nit:24,2--25:41)"}; - trace.prev = tracehead; tracehead = &trace; - tracehead = trace.prev; - return ATTR_vararg___MMSignature____vararg_rank( self) /*MMSignature::_vararg_rank*/; +val_t vararg___MMSignature___vararg_rank(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_vararg; + fra.me.line = 24; + fra.me.meth = LOCATE_vararg___MMSignature___vararg_rank; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./metamodel//vararg.nit:24 */ + REGB0 = TAG_Bool(ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_vararg_rank", LOCATE_vararg, 24); + } + REGB0 = ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[0]); + stack_frame_head = fra.me.prev; + return REGB0; } -void vararg___MMSignature___vararg_rank__eq(val_t self, val_t param0) { - struct trace_t trace = {NULL, "vararg::MMSignature::vararg_rank= (src/metamodel//vararg.nit:24,2--25:41)"}; - trace.prev = tracehead; tracehead = &trace; - ATTR_vararg___MMSignature____vararg_rank( self) /*MMSignature::_vararg_rank*/ = param0; - tracehead = trace.prev; +void vararg___MMSignature___vararg_rank__eq(val_t p0, val_t p1){ + 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_vararg; + fra.me.line = 24; + fra.me.meth = LOCATE_vararg___MMSignature___vararg_rank__eq; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + REGB0 = p1; + /* ./metamodel//vararg.nit:24 */ + ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[0]) = REGB0; + stack_frame_head = fra.me.prev; return; } -val_t vararg___MMSignature___has_vararg(val_t self) { - struct trace_t trace = {NULL, "vararg::MMSignature::has_vararg (src/metamodel//vararg.nit:27,2--30:26)"}; - val_t variable0; - trace.prev = tracehead; tracehead = &trace; - variable0 = ATTR_vararg___MMSignature____vararg_rank( self) /*MMSignature::_vararg_rank*/; - variable0 = TAG_Bool(UNTAG_Int(variable0)>=UNTAG_Int( TAG_Int(0))); - goto return_label0; - return_label0: while(false); - tracehead = trace.prev; - return variable0; +val_t vararg___MMSignature___has_vararg(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_vararg; + fra.me.line = 27; + fra.me.meth = LOCATE_vararg___MMSignature___has_vararg; + fra.me.has_broke = 0; + fra.me.REG_size = 1; + fra.me.REG[0] = NIT_NULL; + fra.me.REG[0] = p0; + /* ./metamodel//vararg.nit:30 */ + REGB0 = TAG_Bool(ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[0])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_vararg_rank", LOCATE_vararg, 30); + } + REGB0 = ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[0]); + REGB1 = TAG_Int(0); + /* ./../lib/standard//kernel.nit:213 */ + REGB1 = TAG_Bool(UNTAG_Int(REGB0)>=UNTAG_Int(REGB1)); + /* ./metamodel//vararg.nit:30 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return REGB1; } -val_t vararg___MMSignature___adaptation_to(val_t self, val_t param0) { - struct trace_t trace = {NULL, "vararg::MMSignature::adaptation_to (src/metamodel//vararg.nit:33,2--37:10)"}; - val_t variable0; - val_t variable1; - val_t variable2; - trace.prev = tracehead; tracehead = &trace; - variable0 = param0; - variable2 = ((vararg___MMSignature___adaptation_to_t)CALL( self,COLOR_SUPER_vararg___MMSignature___adaptation_to))( self, variable0 /*r*/) /*super MMSignature::adaptation_to*/; - variable1 = variable2; - variable2 = ATTR_vararg___MMSignature____vararg_rank( self) /*MMSignature::_vararg_rank*/; - ((vararg___MMSignature___vararg_rank__eq_t)CALL( variable1 /*s*/,COLOR_vararg___MMSignature___vararg_rank__eq))( variable1 /*s*/, variable2) /*MMSignature::vararg_rank=*/; - variable1 = variable1 /*s*/; - goto return_label1; - return_label1: while(false); - tracehead = trace.prev; - return variable1; +val_t vararg___MMSignature___adaptation_to(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_vararg; + fra.me.line = 33; + fra.me.meth = LOCATE_vararg___MMSignature___adaptation_to; + 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//vararg.nit:33 */ + fra.me.REG[2] = fra.me.REG[0]; + /* ./metamodel//vararg.nit:35 */ + fra.me.REG[1] = CALL_SUPER_vararg___MMSignature___adaptation_to(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1]); + /* ./metamodel//vararg.nit:36 */ + REGB0 = TAG_Bool(ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[2])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_vararg_rank", LOCATE_vararg, 36); + } + REGB0 = ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[2]); + CALL_vararg___MMSignature___vararg_rank__eq(fra.me.REG[1])(fra.me.REG[1], REGB0); + /* ./metamodel//vararg.nit:37 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[1]; } -void vararg___MMSignature___init(val_t self, val_t param0, val_t param1, val_t param2, int* init_table) { - struct trace_t trace = {NULL, "vararg::MMSignature::init (src/metamodel//vararg.nit:40,2--43:19)"}; - val_t variable0; - val_t variable1; - val_t variable2; - val_t variable3; - trace.prev = tracehead; tracehead = &trace; - variable0 = param0; - variable1 = param1; - variable2 = param2; - if (init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMSignature].i]) return; - ((vararg___MMSignature___init_t)CALL( self,COLOR_SUPER_vararg___MMSignature___init))( self, param0, param1, param2, init_table) /*super MMSignature::init*/; - variable3 = TAG_Int(-UNTAG_Int( TAG_Int(1))); - ATTR_vararg___MMSignature____vararg_rank( self) /*MMSignature::_vararg_rank*/ = variable3; - init_table[VAL2OBJ( self)->vft[INIT_TABLE_POS_MMSignature].i] = 1; - tracehead = trace.prev; +val_t vararg___MMSignature___not_for_self(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_vararg; + fra.me.line = 40; + fra.me.meth = LOCATE_vararg___MMSignature___not_for_self; + 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//vararg.nit:40 */ + fra.me.REG[1] = fra.me.REG[0]; + /* ./metamodel//vararg.nit:42 */ + fra.me.REG[0] = CALL_SUPER_vararg___MMSignature___not_for_self(fra.me.REG[0])(fra.me.REG[0]); + /* ./metamodel//vararg.nit:43 */ + REGB0 = TAG_Bool(ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[1])!=NIT_NULL); + if (UNTAG_Bool(REGB0)) { + } else { + nit_abort("Uninitialized attribute %s", "_vararg_rank", LOCATE_vararg, 43); + } + REGB0 = ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[1]); + CALL_vararg___MMSignature___vararg_rank__eq(fra.me.REG[0])(fra.me.REG[0], REGB0); + /* ./metamodel//vararg.nit:44 */ + goto label1; + label1: while(0); + stack_frame_head = fra.me.prev; + return fra.me.REG[0]; +} +void vararg___MMSignature___init(val_t p0, val_t p1, val_t p2, val_t p3, int* init_table){ + int itpos0 = VAL2OBJ(p0)->vft[INIT_TABLE_POS_MMSignature].i; + struct {struct stack_frame_t me; val_t MORE_REG[4];} 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_vararg; + fra.me.line = 47; + fra.me.meth = LOCATE_vararg___MMSignature___init; + 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; + fra.me.REG[2] = p2; + fra.me.REG[3] = p3; + /* ./metamodel//vararg.nit:47 */ + fra.me.REG[4] = fra.me.REG[0]; + /* ./metamodel//vararg.nit:49 */ + CALL_SUPER_vararg___MMSignature___init(fra.me.REG[0])(fra.me.REG[0], fra.me.REG[1], fra.me.REG[2], fra.me.REG[3], init_table); + /* ./metamodel//vararg.nit:50 */ + REGB0 = TAG_Int(1); + /* ./../lib/standard//kernel.nit:216 */ + REGB0 = TAG_Int(-UNTAG_Int(REGB0)); + /* ./metamodel//vararg.nit:50 */ + ATTR_vararg___MMSignature____vararg_rank(fra.me.REG[4]) = REGB0; + stack_frame_head = fra.me.prev; + init_table[itpos0] = 1; return; }