The RESUME instruction was added to make resumption points explicit in the bytecode. This makes it easier to implement tracing, quickening, and interrupt checks as there is an explicit place to perform these checks.
Unfortunately, it also has considerable overhead. So we should remove it.
To do that, we need to:
Remove f_state from the InterpreterFrame so we don't need to update it.
2 .Quicken automatically in the adaptive instructions.
Check the evalbreaker when resuming a frame in the interpreter.
Add some metadata to the code object, so that we know when to fire "call" events when tracing.
Although we could remove the RESUME instruction, it does provide a useful point to add PEP 669 and optimizer hooks, that would be a lot messier without it. So, I'm going to leave it in (for now at least).
f_statefield, and make ownership of_PyInterpreterFrameexplicit. #31963Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: