From: Keith J. <bu...@us...> - 2002-08-23 15:22:46
|
Update of /cvsroot/cup-language/cup/src/compiler In directory usw-pr-cvs1:/tmp/cvs-serv29748/compiler Modified Files: binary.c Log Message: Lot of work being done Index: binary.c =================================================================== RCS file: /cvsroot/cup-language/cup/src/compiler/binary.c,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -r1.15 -r1.16 *** binary.c 22 Aug 2002 18:57:25 -0000 1.15 --- binary.c 23 Aug 2002 15:22:40 -0000 1.16 *************** *** 598,601 **** --- 598,602 ---- case CUPCOP_RETURN: // PUSH arg (optional?) + // POPSCOPE // RET if (node->one) *************** *** 603,606 **** --- 604,608 ---- if (comp->traceback) return; + cupc_code_write(comp, CUPOP_POPSCOPE); cupc_code_write(comp, CUPOP_RET); break; *************** *** 658,664 **** --- 660,668 ---- case CUPCOP_FUNCTION: // JMP label1 + // PUSHSCOPE // ARG blah // ARG y // code + // POPSCOPE // RET lstart = comp->codelen; *************** *** 671,674 **** --- 675,679 ---- comp->codelen); cupc_code_free_label(node->label); + cupc_code_write(comp, CUPOP_PUSHSCOPE); for (argnode = node->two; argnode && argnode->next; argnode = argnode->next) *************** *** 690,693 **** --- 695,699 ---- d = 0; cupc_code_write_data(comp, &d, sizeof(unsigned long)); + cupc_code_write(comp, CUPOP_POPSCOPE); cupc_code_write(comp, CUPOP_RET); cupc_code_fix_jumps(comp, label1, comp->codelen, lstart); |