mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
GH-128375: Better instrument for FOR_ITER
(GH-128445)
This commit is contained in:
parent
b9c693dcca
commit
f826beca0c
27 changed files with 827 additions and 544 deletions
14
Python/executor_cases.c.h
generated
14
Python/executor_cases.c.h
generated
|
@ -411,6 +411,20 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _END_FOR: {
|
||||
_PyStackRef value;
|
||||
value = stack_pointer[-1];
|
||||
/* Don't update instr_ptr, so that POP_ITER sees
|
||||
* the FOR_ITER as the previous instruction.
|
||||
* This has the benign side effect that if value is
|
||||
* finalized it will see the location as the FOR_ITER's.
|
||||
*/
|
||||
PyStackRef_CLOSE(value);
|
||||
stack_pointer += -1;
|
||||
assert(WITHIN_STACK_BOUNDS());
|
||||
break;
|
||||
}
|
||||
|
||||
case _END_SEND: {
|
||||
_PyStackRef value;
|
||||
_PyStackRef receiver;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue