[Python-checkins] python/dist/src/Python newcompile.c, 1.1.2.59,
1.1.2.60
nnorwitz at users.sourceforge.net
nnorwitz at users.sourceforge.net
Mon Dec 29 17:10:44 EST 2003
Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv23913/Python
Modified Files:
Tag: ast-branch
newcompile.c
Log Message:
Add a few more known problems
Fix nested if statements
Fix for statements
Index: newcompile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/newcompile.c,v
retrieving revision 1.1.2.59
retrieving revision 1.1.2.60
diff -C2 -d -r1.1.2.59 -r1.1.2.60
*** newcompile.c 29 Dec 2003 03:49:43 -0000 1.1.2.59
--- newcompile.c 29 Dec 2003 22:10:41 -0000 1.1.2.60
***************
*** 18,28 ****
2:
- LOAD_NAME is output instead of LOAD_GLOBAL
-
- 3:
Get this err msg: XXX rd_object called with exception set
From Python/marshal.c::PyMarshal_ReadLastObjectFromFile()
This looks like it may be related to #1.
*/
--- 18,33 ----
2:
Get this err msg: XXX rd_object called with exception set
From Python/marshal.c::PyMarshal_ReadLastObjectFromFile()
This looks like it may be related to #1.
+ 3:
+ LOAD_NAME is output instead of LOAD_GLOBAL
+
+ 4:
+ typing Ctrl-C seg faults
+
+ 5:
+ line numbers are off
*/
***************
*** 856,884 ****
if (end < 0)
return 0;
! for (;;) {
! next = compiler_new_block(c);
! if (next < 0)
! return 0;
! VISIT(c, expr, s->v.If.test);
! ADDOP_JREL(c, JUMP_IF_FALSE, next);
! ADDOP(c, POP_TOP);
! 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) {
! stmt_ty t = asdl_seq_GET(s->v.If.orelse, 0);
! if (t->kind == If_kind) {
! s = t;
! c->u->u_lineno = t->lineno;
! }
! else {
! VISIT_SEQ(c, stmt, s->v.If.orelse);
! break;
! }
! }
! else
! break;
! }
compiler_use_next_block(c, end);
return 1;
--- 861,876 ----
if (end < 0)
return 0;
! next = compiler_new_block(c);
! if (next < 0)
! return 0;
! VISIT(c, expr, s->v.If.test);
! ADDOP_JREL(c, JUMP_IF_FALSE, next);
! ADDOP(c, POP_TOP);
! 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)
! VISIT_SEQ(c, stmt, s->v.If.orelse);
compiler_use_next_block(c, end);
return 1;
***************
*** 905,909 ****
VISIT_SEQ(c, stmt, s->v.For.body);
ADDOP_JABS(c, JUMP_ABSOLUTE, start);
! compiler_use_next_block(c, cleanup);
ADDOP(c, POP_BLOCK);
compiler_pop_fblock(c, LOOP, start);
--- 897,901 ----
VISIT_SEQ(c, stmt, s->v.For.body);
ADDOP_JABS(c, JUMP_ABSOLUTE, start);
! compiler_use_block(c, cleanup);
ADDOP(c, POP_BLOCK);
compiler_pop_fblock(c, LOOP, start);
More information about the Python-checkins
mailing list