Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 14147:21ec69a56228 legacy-trunk
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.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Thu, 24 Aug 2000 00:32:09 +0000 |
| parents | 2de0cc174c3b |
| children | 1b9fd0cbd914 |
line wrap: on
line diff
--- a/Python/ceval.c Wed Aug 23 23:31:34 2000 +0000 +++ b/Python/ceval.c Thu Aug 24 00:32:09 2000 +0000 @@ -613,6 +613,7 @@ opcode = NEXTOP(); if (HAS_ARG(opcode)) oparg = NEXTARG(); + dispatch_opcode: #ifdef DYNAMIC_EXECUTION_PROFILE #ifdef DXPAIRS dxpairs[lastopcode][opcode]++; @@ -1750,6 +1751,11 @@ if (x != NULL) continue; break; + case EXTENDED_ARG: + opcode = NEXTOP(); + oparg = oparg<<16 | NEXTARG(); + goto dispatch_opcode; + break; default: fprintf(stderr,
