diff options
author | Fred Drake <fdrake@acm.org> | 2000-08-24 00:32:09 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-08-24 00:32:09 (GMT) |
commit | ef8ace3a6f6cf8396fa92ae62352e8a29ddfca1d (patch) | |
tree | 799778ef59de6c384636792eb8f1e2ddc1e918a8 /Include | |
parent | e266e42c9c1d20b24d18def1c4398e75fe1620f0 (diff) | |
download | cpython-ef8ace3a6f6cf8396fa92ae62352e8a29ddfca1d.zip cpython-ef8ace3a6f6cf8396fa92ae62352e8a29ddfca1d.tar.gz cpython-ef8ace3a6f6cf8396fa92ae62352e8a29ddfca1d.tar.bz2 |
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.
Diffstat (limited to 'Include')
-rw-r--r-- | Include/node.h | 4 | ||||
-rw-r--r-- | Include/opcode.h | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Include/node.h b/Include/node.h index affa8cd..96eb350 100644 --- a/Include/node.h +++ b/Include/node.h @@ -19,8 +19,8 @@ extern "C" { typedef struct _node { short n_type; char *n_str; - short n_lineno; - short n_nchildren; + int n_lineno; + int n_nchildren; struct _node *n_child; } node; diff --git a/Include/opcode.h b/Include/opcode.h index a7b642a..f900aa9 100644 --- a/Include/opcode.h +++ b/Include/opcode.h @@ -130,6 +130,9 @@ redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES. #define CALL_FUNCTION_KW 141 /* #args + (#kwargs<<8) */ #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}; |