mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
gh-139109: Dynamic opcode targets (GH-139111)
Make opcode targets table dynamic
This commit is contained in:
parent
243d599a05
commit
a269e691de
5 changed files with 19 additions and 17 deletions
6
Python/opcode_targets.h
generated
6
Python/opcode_targets.h
generated
|
|
@ -1,5 +1,5 @@
|
|||
#if !_Py_TAIL_CALL_INTERP
|
||||
static void *opcode_targets[256] = {
|
||||
static void *opcode_targets_table[256] = {
|
||||
&&TARGET_CACHE,
|
||||
&&TARGET_BINARY_SLICE,
|
||||
&&TARGET_BUILD_TEMPLATE,
|
||||
|
|
@ -258,7 +258,7 @@ static void *opcode_targets[256] = {
|
|||
&&TARGET_ENTER_EXECUTOR,
|
||||
};
|
||||
#else /* _Py_TAIL_CALL_INTERP */
|
||||
static py_tail_call_funcptr INSTRUCTION_TABLE[256];
|
||||
static py_tail_call_funcptr instruction_funcptr_table[256];
|
||||
|
||||
Py_PRESERVE_NONE_CC static PyObject *_TAIL_CALL_pop_2_error(TAIL_CALL_PARAMS);
|
||||
Py_PRESERVE_NONE_CC static PyObject *_TAIL_CALL_pop_1_error(TAIL_CALL_PARAMS);
|
||||
|
|
@ -503,7 +503,7 @@ Py_PRESERVE_NONE_CC static PyObject *_TAIL_CALL_UNKNOWN_OPCODE(TAIL_CALL_PARAMS)
|
|||
JUMP_TO_LABEL(error);
|
||||
}
|
||||
|
||||
static py_tail_call_funcptr INSTRUCTION_TABLE[256] = {
|
||||
static py_tail_call_funcptr instruction_funcptr_table[256] = {
|
||||
[BINARY_OP] = _TAIL_CALL_BINARY_OP,
|
||||
[BINARY_OP_ADD_FLOAT] = _TAIL_CALL_BINARY_OP_ADD_FLOAT,
|
||||
[BINARY_OP_ADD_INT] = _TAIL_CALL_BINARY_OP_ADD_INT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue