mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
gh-106581: Project through calls (#108067)
This finishes the work begun in gh-107760. When, while projecting a superblock, we encounter a call to a short, simple function, the superblock will now enter the function using `_PUSH_FRAME`, continue through it, and leave it using `_POP_FRAME`, and then continue through the original code. Multiple frame pushes and pops are even possible. It is also possible to stop appending to the superblock in the middle of a called function, when running out of space or encountering an unsupported bytecode.
This commit is contained in:
parent
292a22bdc2
commit
61c7249759
16 changed files with 409 additions and 109 deletions
9
Python/abstract_interp_cases.c.h
generated
9
Python/abstract_interp_cases.c.h
generated
|
@ -7,6 +7,10 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case RESUME: {
|
||||
break;
|
||||
}
|
||||
|
||||
case POP_TOP: {
|
||||
STACK_SHRINK(1);
|
||||
break;
|
||||
|
@ -191,6 +195,11 @@
|
|||
break;
|
||||
}
|
||||
|
||||
case _POP_FRAME: {
|
||||
STACK_SHRINK(1);
|
||||
break;
|
||||
}
|
||||
|
||||
case GET_AITER: {
|
||||
PARTITIONNODE_OVERWRITE((_Py_PARTITIONNODE_t *)PARTITIONNODE_NULLROOT, PEEK(-(-1)), true);
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue