Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Description
TheTIER_ONE andTIER_TWO macros cause a few problems:
Their presence in the bytecode definitions means that anyone maintaining the interpreter or adding new instructions needs to understand the internals of the multiple execution layers and how they differ.
This makes the entry barrier for contribution, which is already high for these components, even higher.
It makes reasoning about the correctness of optimizations harder.
It prevents the addition of new execution tiers, or changing the design of the current tiers much harder.
We can remove theTIER_ONE andTIER_TWO macros by making modifications to internal execution engine state explicit, without describing how that state is implemented.
For example, rather than modifyingnext_instr in the tier 1 interpreter, we can useJUMP_BY orSAVE_IP macros.
Seefaster-cpython/ideas#618
Linked PRs
- GH-108614: Add
RESUME_CHECKinstruction #108630 - GH-108614: Remove non-debug uses of
#if TIER_ONEand#if TIER_TWOfrom_POP_FRAMEop. #108685 - GH-108614: Remove
TIER_ONEandTIER_TWOfrom_PUSH_FRAME#108725 - GH-108614: Unbreak emscripten build #109132
- GH-108614: Increase importlib MAGIC for RESUME_CHECK instruction #109247