-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-119689: generate stack effect metadata for pseudo instructions #119691
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
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.
LGTM, though I'm not sure what should happen to the jump
argument.
@@ -703,51 +703,22 @@ compiler_set_qualname(struct compiler *c) | |||
static int | |||
stack_effect(int opcode, int oparg, int jump) |
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.
Is jump
still used? The deleted SETUP
cases use it, but I don't think the generated code uses it. Is it no longer needed? Could you remove the jump
argument then? (All the callers are inside this file.)
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.
jump is exposed in the c api and used from flowgraph.c.
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.
I see, the key is IS_BLOCK_PUSH_OPCODE(opcode)
. Sorry I didn't get that at first.
Fixes #119689.