[Python-checkins] python/dist/src/Python newcompile.c,1.1.2.37,1.1.2.38
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
2003年3月25日 14:05:08 -0800
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv14774
Modified Files:
Tag: ast-branch
newcompile.c
Log Message:
Change "if" generation to reduce (or eliminate) the chance that we
generate code that doesn't end with "return None".
In debug block output, display each block's next block too.
Index: newcompile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/newcompile.c,v
retrieving revision 1.1.2.37
retrieving revision 1.1.2.38
diff -C2 -d -r1.1.2.37 -r1.1.2.38
*** newcompile.c 25 Mar 2003 21:40:06 -0000 1.1.2.37
--- newcompile.c 25 Mar 2003 22:04:59 -0000 1.1.2.38
***************
*** 83,87 ****
static int compiler_visit_expr(struct compiler *, expr_ty);
static int compiler_augassign(struct compiler *, stmt_ty);
! static int compiler_visit_slice(struct compiler *c, slice_ty s,
expr_context_ty ctx);
--- 83,87 ----
static int compiler_visit_expr(struct compiler *, expr_ty);
static int compiler_augassign(struct compiler *, stmt_ty);
! static int compiler_visit_slice(struct compiler *c, slice_ty s,
expr_context_ty ctx);
***************
*** 712,716 ****
break;
}
! compiler_use_block(c, end);
return 1;
}
--- 712,716 ----
break;
}
! compiler_use_next_block(c, end);
return 1;
}
***************
*** 1844,1849 ****
for (i = a.a_nblocks - 1; i >= 0; i--) {
struct basicblock *b = c->u->u_blocks[a.a_postorder[i]];
! fprintf(stderr, "block %d(%d): used=%d alloc=%d\n",
! i, a.a_postorder[i], b->b_iused, b->b_ialloc);
for (j = 0; j < b->b_iused; j++) {
if (!assemble_emit(&a, &b->b_instr[j]))
--- 1844,1849 ----
for (i = a.a_nblocks - 1; i >= 0; i--) {
struct basicblock *b = c->u->u_blocks[a.a_postorder[i]];
! fprintf(stderr, "block %d(%d): used=%d alloc=%d next=%d\n",
! i, a.a_postorder[i], b->b_iused, b->b_ialloc, b->b_next);
for (j = 0; j < b->b_iused; j++) {
if (!assemble_emit(&a, &b->b_instr[j]))