Skip to content

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

Merged
iritkatriel merged 3 commits intopython:mainfrom
iritkatriel:dis-jumparg
Feb 16, 2024
Merged

gh-112720: make it easier to subclass and modify dis.ArgResolver's jump arg resolution#115564
iritkatriel merged 3 commits intopython:mainfrom
iritkatriel:dis-jumparg

Conversation

@iritkatriel
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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