mirror of
https://github.com/python/cpython.git
synced 2026-06-05 17:31:21 +00:00
GH-143732: SEND specialization (GH-148963)
* SEND specialization. Adds 2 new specialized instructions: * SEND_VIRTUAL: for sends to virtual iterators e.g lists and tuples * SEND_ASYNC_GEN: for sends to async generators Tweak FOR_ITER_VIRTUAL so that SEND_VIRTUAL and FOR_ITER_VIRTUAL use equivalent guards
This commit is contained in:
parent
ffb543d32f
commit
70bd1c2dd2
29 changed files with 2662 additions and 1548 deletions
18
Python/opcode_targets.h
generated
18
Python/opcode_targets.h
generated
|
|
@ -202,7 +202,9 @@ static void *opcode_targets_table[256] = {
|
|||
&&TARGET_LOAD_SUPER_ATTR_METHOD,
|
||||
&&TARGET_RESUME_CHECK,
|
||||
&&TARGET_RESUME_CHECK_JIT,
|
||||
&&TARGET_SEND_ASYNC_GEN,
|
||||
&&TARGET_SEND_GEN,
|
||||
&&TARGET_SEND_VIRTUAL,
|
||||
&&TARGET_STORE_ATTR_INSTANCE_VALUE,
|
||||
&&TARGET_STORE_ATTR_SLOT,
|
||||
&&TARGET_STORE_ATTR_WITH_HINT,
|
||||
|
|
@ -231,8 +233,6 @@ static void *opcode_targets_table[256] = {
|
|||
&&_unknown_opcode,
|
||||
&&_unknown_opcode,
|
||||
&&_unknown_opcode,
|
||||
&&_unknown_opcode,
|
||||
&&_unknown_opcode,
|
||||
&&TARGET_INSTRUMENTED_END_FOR,
|
||||
&&TARGET_INSTRUMENTED_POP_ITER,
|
||||
&&TARGET_INSTRUMENTED_END_SEND,
|
||||
|
|
@ -476,8 +476,8 @@ static void *opcode_tracing_targets_table[256] = {
|
|||
&&TARGET_TRACE_RECORD,
|
||||
&&TARGET_TRACE_RECORD,
|
||||
&&TARGET_TRACE_RECORD,
|
||||
&&_unknown_opcode,
|
||||
&&_unknown_opcode,
|
||||
&&TARGET_TRACE_RECORD,
|
||||
&&TARGET_TRACE_RECORD,
|
||||
&&_unknown_opcode,
|
||||
&&_unknown_opcode,
|
||||
&&_unknown_opcode,
|
||||
|
|
@ -725,7 +725,9 @@ static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_RESUME_CHECK_JIT(TAIL_CALL_PARAM
|
|||
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_RETURN_GENERATOR(TAIL_CALL_PARAMS);
|
||||
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_RETURN_VALUE(TAIL_CALL_PARAMS);
|
||||
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_SEND(TAIL_CALL_PARAMS);
|
||||
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_SEND_ASYNC_GEN(TAIL_CALL_PARAMS);
|
||||
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_SEND_GEN(TAIL_CALL_PARAMS);
|
||||
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_SEND_VIRTUAL(TAIL_CALL_PARAMS);
|
||||
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_SETUP_ANNOTATIONS(TAIL_CALL_PARAMS);
|
||||
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_SET_ADD(TAIL_CALL_PARAMS);
|
||||
static PyObject *Py_PRESERVE_NONE_CC _TAIL_CALL_SET_FUNCTION_ATTRIBUTE(TAIL_CALL_PARAMS);
|
||||
|
|
@ -969,7 +971,9 @@ static py_tail_call_funcptr instruction_funcptr_handler_table[256] = {
|
|||
[RETURN_GENERATOR] = _TAIL_CALL_RETURN_GENERATOR,
|
||||
[RETURN_VALUE] = _TAIL_CALL_RETURN_VALUE,
|
||||
[SEND] = _TAIL_CALL_SEND,
|
||||
[SEND_ASYNC_GEN] = _TAIL_CALL_SEND_ASYNC_GEN,
|
||||
[SEND_GEN] = _TAIL_CALL_SEND_GEN,
|
||||
[SEND_VIRTUAL] = _TAIL_CALL_SEND_VIRTUAL,
|
||||
[SETUP_ANNOTATIONS] = _TAIL_CALL_SETUP_ANNOTATIONS,
|
||||
[SET_ADD] = _TAIL_CALL_SET_ADD,
|
||||
[SET_FUNCTION_ATTRIBUTE] = _TAIL_CALL_SET_FUNCTION_ATTRIBUTE,
|
||||
|
|
@ -1015,8 +1019,6 @@ static py_tail_call_funcptr instruction_funcptr_handler_table[256] = {
|
|||
[125] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[126] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[127] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[217] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[218] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[219] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[220] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[221] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
|
|
@ -1227,7 +1229,9 @@ static py_tail_call_funcptr instruction_funcptr_tracing_table[256] = {
|
|||
[RETURN_GENERATOR] = _TAIL_CALL_TRACE_RECORD,
|
||||
[RETURN_VALUE] = _TAIL_CALL_TRACE_RECORD,
|
||||
[SEND] = _TAIL_CALL_TRACE_RECORD,
|
||||
[SEND_ASYNC_GEN] = _TAIL_CALL_TRACE_RECORD,
|
||||
[SEND_GEN] = _TAIL_CALL_TRACE_RECORD,
|
||||
[SEND_VIRTUAL] = _TAIL_CALL_TRACE_RECORD,
|
||||
[SETUP_ANNOTATIONS] = _TAIL_CALL_TRACE_RECORD,
|
||||
[SET_ADD] = _TAIL_CALL_TRACE_RECORD,
|
||||
[SET_FUNCTION_ATTRIBUTE] = _TAIL_CALL_TRACE_RECORD,
|
||||
|
|
@ -1273,8 +1277,6 @@ static py_tail_call_funcptr instruction_funcptr_tracing_table[256] = {
|
|||
[125] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[126] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[127] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[217] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[218] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[219] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[220] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
[221] = _TAIL_CALL_UNKNOWN_OPCODE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue