[Python-checkins] python/dist/src/Python newcompile.c,1.1.2.49,1.1.2.50
nnorwitz@users.sourceforge.net
nnorwitz@users.sourceforge.net
Tue, 01 Apr 2003 14:17:08 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv26806/Python
Modified Files:
Tag: ast-branch
newcompile.c
Log Message:
I get to the prompt with this change. Although importing site still fails.
* fix referencing freed memory (b) after a resize
* always use compiler_use_next_block() after JUMP_FORWARD
this fixes a problem with if 1: try: pass ; except ImportError: pass
Index: newcompile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/newcompile.c,v
retrieving revision 1.1.2.49
retrieving revision 1.1.2.50
diff -C2 -d -r1.1.2.49 -r1.1.2.50
*** newcompile.c 31 Mar 2003 21:44:31 -0000 1.1.2.49
--- newcompile.c 1 Apr 2003 22:17:00 -0000 1.1.2.50
***************
*** 473,476 ****
--- 473,477 ----
fprintf(stderr, "resize block %d\n", block);
c->u->u_blocks[block] = (struct basicblock *)ptr;
+ b = ptr;
}
}
***************
*** 816,820 ****
VISIT_SEQ(c, stmt, s->v.If.body);
ADDOP_JREL(c, JUMP_FORWARD, end);
! compiler_use_block(c, next);
ADDOP(c, POP_TOP);
if (s->v.If.orelse) {
--- 817,821 ----
VISIT_SEQ(c, stmt, s->v.If.body);
ADDOP_JREL(c, JUMP_FORWARD, end);
! compiler_use_next_block(c, next);
ADDOP(c, POP_TOP);
if (s->v.If.orelse) {
***************
*** 1586,1590 ****
int end = compiler_new_block(c);
ADDOP_JREL(c, JUMP_FORWARD, end);
! compiler_use_block(c, cleanup);
ADDOP(c, ROT_TWO);
ADDOP(c, POP_TOP);
--- 1587,1591 ----
int end = compiler_new_block(c);
ADDOP_JREL(c, JUMP_FORWARD, end);
! compiler_use_next_block(c, cleanup);
ADDOP(c, ROT_TWO);
ADDOP(c, POP_TOP);