mirror of
https://github.com/python/cpython.git
synced 2025-09-08 18:01:44 +00:00
gh-131798: Optimize _ITER_CHECK_TUPLE
(GH-134803)
This commit is contained in:
parent
ac539e7e0d
commit
79d81f7cba
3 changed files with 14 additions and 0 deletions
|
@ -914,6 +914,13 @@ dummy_func(void) {
|
|||
}
|
||||
}
|
||||
|
||||
op(_ITER_CHECK_TUPLE, (iter, null_or_index -- iter, null_or_index)) {
|
||||
if (sym_matches_type(iter, &PyTuple_Type)) {
|
||||
REPLACE_OP(this_instr, _NOP, 0, 0);
|
||||
}
|
||||
sym_set_type(iter, &PyTuple_Type);
|
||||
}
|
||||
|
||||
op(_ITER_NEXT_RANGE, (iter, null_or_index -- iter, null_or_index, next)) {
|
||||
next = sym_new_type(ctx, &PyLong_Type);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue