Skip to content

Commit e48ac9c

Browse files
authored
GH-90690: Remove PRECALL instruction (GH-92925)
1 parent 4163896 commit e48ac9c

File tree

14 files changed

+544
-701
lines changed

14 files changed

+544
-701
lines changed

Doc/library/dis.rst

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,8 @@ the following command can be used to display the disassembly of
4545
2 2 PUSH_NULL
4646
4 LOAD_GLOBAL 1 (NULL + len)
4747
6 LOAD_FAST 0 (alist)
48-
8 PRECALL 1
49-
10 CALL 1
50-
12 RETURN_VALUE
48+
8 CALL 1
49+
18 RETURN_VALUE
5150

5251
(The "2" is a line number).
5352

@@ -119,7 +118,6 @@ Example::
119118
PUSH_NULL
120119
LOAD_GLOBAL
121120
LOAD_FAST
122-
PRECALL
123121
CALL
124122
RETURN_VALUE
125123

@@ -1182,15 +1180,6 @@ iterations of the loop.
11821180
.. versionadded:: 3.7
11831181

11841182

1185-
.. opcode:: PRECALL (argc)
1186-
1187-
Prefixes :opcode:`CALL`. Logically this is a no op.
1188-
It exists to enable effective specialization of calls.
1189-
``argc`` is the number of arguments as described in :opcode:`CALL`.
1190-
1191-
.. versionadded:: 3.11
1192-
1193-
11941183
.. opcode:: PUSH_NULL
11951184

11961185
Pushes a ``NULL`` to the stack.
@@ -1202,7 +1191,7 @@ iterations of the loop.
12021191

12031192
.. opcode:: KW_NAMES (i)
12041193

1205-
Prefixes :opcode:`PRECALL`.
1194+
Prefixes :opcode:`CALL`.
12061195
Stores a reference to ``co_consts[consti]`` into an internal variable
12071196
for use by :opcode:`CALL`. ``co_consts[consti]`` must be a tuple of strings.
12081197

Include/internal/pycore_code.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,6 @@ typedef struct {
8080

8181
#define INLINE_CACHE_ENTRIES_CALL CACHE_ENTRIES(_PyCallCache)
8282

83-
typedef struct {
84-
_Py_CODEUNIT counter;
85-
} _PyPrecallCache;
86-
87-
#define INLINE_CACHE_ENTRIES_PRECALL CACHE_ENTRIES(_PyPrecallCache)
88-
8983
typedef struct {
9084
_Py_CODEUNIT counter;
9185
} _PyStoreSubscrCache;
@@ -249,8 +243,6 @@ extern int _Py_Specialize_BinarySubscr(PyObject *sub, PyObject *container, _Py_C
249243
extern int _Py_Specialize_StoreSubscr(PyObject *container, PyObject *sub, _Py_CODEUNIT *instr);
250244
extern int _Py_Specialize_Call(PyObject *callable, _Py_CODEUNIT *instr,
251245
int nargs, PyObject *kwnames);
252-
extern int _Py_Specialize_Precall(PyObject *callable, _Py_CODEUNIT *instr,
253-
int nargs, PyObject *kwnames, int oparg);
254246
extern void _Py_Specialize_BinaryOp(PyObject *lhs, PyObject *rhs, _Py_CODEUNIT *instr,
255247
int oparg, PyObject **locals);
256248
extern void _Py_Specialize_CompareOp(PyObject *lhs, PyObject *rhs,

Include/internal/pycore_opcode.h

Lines changed: 84 additions & 88 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)