[Python-checkins] python/dist/src/Include compile.h, 2.37.2.8, 2.37.2.9

nascheme at users.sourceforge.net nascheme at users.sourceforge.net
Fri Mar 26 10:34:12 EST 2004


Update of /cvsroot/python/python/dist/src/Include
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20689/Include

Modified Files:
      Tag: ast-branch
	compile.h 
Log Message:
Implement a smarter stackdepth() function.

  * Move 'instr' and 'basicblock' structure definitions out of compile.h
    and into newcompile.c.

  * Add an 'i_target' field to the 'instr' struct.  Use it instead of
    using 'i_oparg' for both block indices and instruction offsets.

  * Update list of outstanding issues and bugs.



Index: compile.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/compile.h,v
retrieving revision 2.37.2.8
retrieving revision 2.37.2.9
diff -C2 -d -r2.37.2.8 -r2.37.2.9
*** compile.h	26 Jul 2003 00:35:15 -0000	2.37.2.8
--- compile.h	26 Mar 2004 15:34:10 -0000	2.37.2.9
***************
*** 35,66 ****
  DL_IMPORT(PyFutureFeatures *) PyFuture_FromAST(struct _mod *, const char *);
  
- #define DEFAULT_BLOCK_SIZE 16
- #define DEFAULT_BLOCKS 8
- #define DEFAULT_CODE_SIZE 128
- #define DEFAULT_LNOTAB_SIZE 16
- 
- struct instr {
- 	int i_jabs : 1;
- 	int i_jrel : 1;
- 	int i_hasarg : 1;
- 	unsigned char i_opcode;
- 	int i_oparg;
- 	int i_lineno;
- };
- 
- struct basicblock {
- 	int b_iused;
- 	int b_ialloc;
- 	/* If b_next is non-zero, it is the block id of the next
- 	   block reached by normal control flow.
- 	   Since a valid b_next must always be > 0,
- 	   0 can be reserved to mean no next block. */
- 	int b_next;
- 	/* b_seen is used to perform a DFS of basicblocks. */
- 	int b_seen : 1;
- 	/* b_return is true if a RETURN_VALUE opcode is inserted. */
- 	int b_return : 1;
- 	struct instr b_instr[DEFAULT_BLOCK_SIZE];
- };
  
  #ifdef __cplusplus
--- 35,38 ----




More information about the Python-checkins mailing list