mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
GH-131798: Split CALL_LIST_APPEND into several uops (GH-134240)
This commit is contained in:
parent
92f85ff3a0
commit
42d03f3933
10 changed files with 370 additions and 259 deletions
|
@ -1087,6 +1087,13 @@ dummy_func(void) {
|
|||
sym_set_null(null);
|
||||
}
|
||||
|
||||
op(_GUARD_NOS_NOT_NULL, (nos, unused -- nos, unused)) {
|
||||
if (sym_is_not_null(nos)) {
|
||||
REPLACE_OP(this_instr, _NOP, 0, 0);
|
||||
}
|
||||
sym_set_non_null(nos);
|
||||
}
|
||||
|
||||
op(_GUARD_THIRD_NULL, (null, unused, unused -- null, unused, unused)) {
|
||||
if (sym_is_null(null)) {
|
||||
REPLACE_OP(this_instr, _NOP, 0, 0);
|
||||
|
@ -1135,6 +1142,14 @@ dummy_func(void) {
|
|||
sym_set_const(callable, isinstance);
|
||||
}
|
||||
|
||||
op(_GUARD_CALLABLE_LIST_APPEND, (callable, unused, unused -- callable, unused, unused)) {
|
||||
PyObject *list_append = _PyInterpreterState_GET()->callable_cache.list_append;
|
||||
if (sym_get_const(ctx, callable) == list_append) {
|
||||
REPLACE_OP(this_instr, _NOP, 0, 0);
|
||||
}
|
||||
sym_set_const(callable, list_append);
|
||||
}
|
||||
|
||||
// END BYTECODES //
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue