void generate_FUNCEND(quad *q){ SymbolTableEntry *f; instruction * t = (instruction *) malloc (sizeof(instruction)); f = pop_func(funcStack); backpatchReturn(f->returnList, NEXTINSTRUCTIONLABEL); q->taddress = NEXTINSTRUCTIONLABEL; t->srcLine= q->line; t->opcode = funcexit_v; if(q->result) make_operand(q->result, &(t->result)); emit_t(t); }
void generate_FUNCEND(quad *q) { SymbolTableEntry *f = pop_func(funcstack); backpatch_returnList(f->returnList, nextinstructionlabel()); q->taddress = nextinstructionlabel(); instruction t; init_instruction(&t); t.srcLine = q->line; t.opcode = funcexit_v; make_operand(q->arg1, t.arg1); emit_icode(t); }