summaryrefslogtreecommitdiffstats
path: root/Include/cpython
diff options
context:
space:
mode:
authorPablo Galindo <Pablogsal@gmail.com>2021-06-08 12:17:55 (GMT)
committerGitHub <noreply@github.com>2021-06-08 12:17:55 (GMT)
commit3fe921cd49959181163671364c8b84faa88f7895 (patch)
tree939bcd1d318405affab0df79ffe650c1565565af /Include/cpython
parent781dc76577b1810666f4ce04d8fc20d8b43fb374 (diff)
downloadcpython-3fe921cd49959181163671364c8b84faa88f7895.zip
cpython-3fe921cd49959181163671364c8b84faa88f7895.tar.gz
cpython-3fe921cd49959181163671364c8b84faa88f7895.tar.bz2
Revert "bpo-43693: Add the MAKE_CELL opcode and interleave fast locals offsets. (gh-26396)" (GH-26597)
This reverts commit 631f9938b1604d4f893417ec339b9e0fa9196fb1.
Diffstat (limited to 'Include/cpython')
-rw-r--r--Include/cpython/code.h11
1 files changed, 2 insertions, 9 deletions
diff --git a/Include/cpython/code.h b/Include/cpython/code.h
index a3db7d9..773df7c 100644
--- a/Include/cpython/code.h
+++ b/Include/cpython/code.h
@@ -2,16 +2,9 @@
# error "this header file must not be included directly"
#endif
-/* Each instruction in a code object is a fixed-width value,
- * currently 2 bytes: 1-byte opcode + 1-byte oparg. The EXTENDED_ARG
- * opcode allows for larger values but the current limit is 3 uses
- * of EXTENDED_ARG (see Python/wordcode_helpers.h), for a maximum
- * 32-bit value. This aligns with the note in Python/compile.c
- * (compiler_addop_i_line) indicating that the max oparg value is
- * 2**32 - 1, rather than INT_MAX.
- */
-
typedef uint16_t _Py_CODEUNIT;
+// Each oparg must fit in the second half of _Py_CODEUNIT, hence 8 bits.
+#define _Py_MAX_OPARG 255
#ifdef WORDS_BIGENDIAN
# define _Py_OPCODE(word) ((word) >> 8)