mirror of
https://github.com/python/cpython.git
synced 2025-11-25 21:11:09 +00:00
GH-91432: Specialize FOR_ITER (GH-91713)
* Adds FOR_ITER_LIST and FOR_ITER_RANGE specializations. * Adds _PyLong_AssignValue() internal function to avoid temporary boxing of ints.
This commit is contained in:
parent
c735d54534
commit
5fcfdd87c9
22 changed files with 447 additions and 282 deletions
|
|
@ -278,7 +278,7 @@ mark_stacks(PyCodeObject *code_obj, int len)
|
|||
{
|
||||
int64_t target_stack = pop_value(next_stack);
|
||||
stacks[i+1] = push_value(next_stack, Object);
|
||||
j = get_arg(code, i) + i + 1;
|
||||
j = get_arg(code, i) + 1 + INLINE_CACHE_ENTRIES_FOR_ITER + i;
|
||||
assert(j < len);
|
||||
assert(stacks[j] == UNINITIALIZED || stacks[j] == target_stack);
|
||||
stacks[j] = target_stack;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue