mirror of
https://github.com/python/cpython.git
synced 2026-02-23 07:31:03 +00:00
GH-131798: Optimize _GUARD_TOS_SLICE (GH-144470)
This commit is contained in:
parent
d73634935c
commit
cfeede85a7
4 changed files with 31 additions and 0 deletions
|
|
@ -1374,6 +1374,13 @@ dummy_func(void) {
|
|||
}
|
||||
}
|
||||
|
||||
op(_GUARD_TOS_SLICE, (tos -- tos)) {
|
||||
if (sym_matches_type(tos, &PySlice_Type)) {
|
||||
ADD_OP(_NOP, 0, 0);
|
||||
}
|
||||
sym_set_type(tos, &PySlice_Type);
|
||||
}
|
||||
|
||||
op(_GUARD_NOS_NULL, (null, unused -- null, unused)) {
|
||||
if (sym_is_null(null)) {
|
||||
ADD_OP(_NOP, 0, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue