Skip to content

gh-112720: make it easier to subclass and modify dis.ArgResolver's jump arg resolution #115564

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 3 commits into from
Feb 16, 2024

Conversation

iritkatriel
Copy link
Member

@iritkatriel iritkatriel commented Feb 16, 2024

This is useful when using dis to display an intermediate, or custom, instruction stream. In that case the jump args may have different meaning than in actual bytecode.

@markshannon markshannon self-requested a review February 16, 2024 17:08
Copy link
Member

@markshannon markshannon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes looks good.

I'm a bit concerned that we are going to end up with an overly complex tool for presenting both bytecode and IR, when we might be better of with two tools. One for IR and one for code objects. What do you think?

@iritkatriel
Copy link
Member Author

The changes looks good.

I'm a bit concerned that we are going to end up with an overly complex tool for presenting both bytecode and IR, when we might be better of with two tools. One for IR and one for code objects. What do you think?

I'm not sure. So far I don't think my changes made dis more complicated. They made it more structured (and configurable).
If it will go the way you fear I can change track and split it into two tools.

@iritkatriel iritkatriel merged commit 74e6f4b into python:main Feb 16, 2024
woodruffw pushed a commit to woodruffw-forks/cpython that referenced this pull request Mar 4, 2024
diegorusso pushed a commit to diegorusso/cpython that referenced this pull request Apr 17, 2024
LukasWoodtli pushed a commit to LukasWoodtli/cpython that referenced this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants