8000 gh-119689: generate stack effect metadata for pseudo instructions by iritkatriel · Pull Request #119691 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

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

Merged
merged 5 commits into from
May 29, 2024

Conversation

iritkatriel
Copy link
Member
@iritkatriel iritkatriel commented May 28, 2024

@iritkatriel iritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label May 28, 2024
Copy link
Member
@gvanrossum gvanrossum left a 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)
Copy link
Member

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.)

Copy link
Member Author

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.

Copy link
Member

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.

@iritkatriel iritkatriel enabled auto-merge (squash) May 29, 2024 09:21
@iritkatriel iritkatriel merged commit c1e9647 into python:main May 29, 2024
64 checks passed
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Generate stack effect for pseudo instructions
2 participants
0