[Python-checkins] python/dist/src/Python newcompile.c,1.1.2.21,1.1.2.22

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Mon, 24 Mar 2003 15:37:50 -0800


Update of /cvsroot/python/python/dist/src/Python
In directory sc8-pr-cvs1:/tmp/cvs-serv28236/Python

Modified Files:
      Tag: ast-branch
	newcompile.c 
Log Message:
Sundry changes to get this branch closer to working on Windows.
Worst hack so far is taking _hotshot out of the compile; unclear why(!)
the compiler hates _hotshot.c on this branch.


Index: newcompile.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Python/Attic/newcompile.c,v
retrieving revision 1.1.2.21
retrieving revision 1.1.2.22
diff -C2 -d -r1.1.2.21 -r1.1.2.22
*** newcompile.c	24 Mar 2003 23:29:23 -0000	1.1.2.21
--- newcompile.c	24 Mar 2003 23:37:46 -0000	1.1.2.22
***************
*** 89,93 ****
  static PyCodeObject *assemble(struct compiler *);
  
! static char *opnames[];
  
  #define IS_JUMP(I) ((I)->i_jrel || (I)->i_jabs)
--- 89,93 ----
  static PyCodeObject *assemble(struct compiler *);
  
! static char *opnames[144];
  
  #define IS_JUMP(I) ((I)->i_jrel || (I)->i_jabs)
***************
*** 415,419 ****
  		if (ptr == NULL)
  			return -1;
! 		memset(ptr + oldsize, 0, newsize - oldsize);
  		if (ptr != (void *)b) {
  			fprintf(stderr, "resize block %d\n", block);
--- 415,419 ----
  		if (ptr == NULL)
  			return -1;
! 		memset((char *)ptr + oldsize, 0, newsize - oldsize);
  		if (ptr != (void *)b) {
  			fprintf(stderr, "resize block %d\n", block);
***************
*** 1136,1141 ****
  		ADDOP(c, DUP_TOP);
  		ADDOP(c, ROT_THREE);
  		ADDOP_I(c, COMPARE_OP, 
! 			asdl_seq_GET(e->v.Compare.ops, i - 1));
  		ADDOP_JREL(c, JUMP_IF_FALSE, cleanup);
  		NEXT_BLOCK(c);
--- 1136,1142 ----
  		ADDOP(c, DUP_TOP);
  		ADDOP(c, ROT_THREE);
+ 		/* XXX We're casting a void* to an int in the next stmt -- bad */
  		ADDOP_I(c, COMPARE_OP, 
! 			(cmpop_ty)asdl_seq_GET(e->v.Compare.ops, i - 1));
  		ADDOP_JREL(c, JUMP_IF_FALSE, cleanup);
  		NEXT_BLOCK(c);