-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
bpo-47172: Make virtual opcodes negative. Make is_jump detect only actual jumps, use is_block_push for the exception block setup opcodes. #32200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…l jumps, use is_block_push for the exception block setup opcodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. I have a few questions/suggestions:
Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
Python/compile.c
Outdated
#define SETUP_WITH 253 | ||
#define POP_BLOCK 252 | ||
#define JUMP 251 | ||
#define SETUP_FINALLY 256 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an idea, but would it make sense for the virtual opcodes to be negative?
>0
: Real
==0
: Cache
<0
: Virtual
It seems like a simpler scheme.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A couple of small suggestions
Thanks |
https://bugs.python.org/issue47172