[Python-checkins] CVS: python/dist/src/Include node.h,2.16,2.17 opcode.h,2.28,2.29

Fred L. Drake python-dev@python.org
Wed, 23 Aug 2000 17:32:12 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory slayer.i.sourceforge.net:/tmp/cvs-serv19656/Include

Modified Files:
	node.h opcode.h 
Log Message:

Charles G. Waldman <cgw@fnal.gov>:
Add the EXTENDED_ARG opcode to the virtual machine, allowing 32-bit
arguments to opcodes instead of being forced to stick to the 16-bit
limit.  This is especially useful for machine-generated code, which
can be too long for the SET_LINENO parameter to fit into 16 bits.

This closes the implementation portion of SourceForge patch #100893.


Index: node.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/node.h,v
retrieving revision 2.16
retrieving revision 2.17
diff -C2 -r2.16 -r2.17
*** node.h	2000/07/08 23:37:28	2.16
--- node.h	2000/08/24 00:32:09	2.17
***************
*** 20,25 ****
      short		n_type;
      char		*n_str;
!     short		n_lineno;
!     short		n_nchildren;
      struct _node	*n_child;
  } node;
--- 20,25 ----
      short		n_type;
      char		*n_str;
!     int			n_lineno;
!     int			n_nchildren;
      struct _node	*n_child;
  } node;

Index: opcode.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/opcode.h,v
retrieving revision 2.28
retrieving revision 2.29
diff -C2 -r2.28 -r2.29
*** opcode.h	2000/08/21 15:36:27	2.28
--- opcode.h	2000/08/24 00:32:09	2.29
***************
*** 131,134 ****
--- 131,137 ----
  #define CALL_FUNCTION_VAR_KW       142	/* #args + (#kwargs<<8) */
  
+ /* Support for opargs more than 16 bits long */
+ #define EXTENDED_ARG  143
+ 
  /* Comparison operator codes (argument to COMPARE_OP) */
  enum cmp_op {LT, LE, EQ, NE, GT, GE, IN, NOT_IN, IS, IS_NOT, EXC_MATCH, BAD};