-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-112720: Move dis's cache output code to the Formatter, labels lookup to the arg_resolver. Reduce the number of parameters passed around. #113108
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
…ion instead of creating fake Instructions to represent it
…at access internals.
@@ -113,7 +113,14 @@ def dis(x=None, *, file=None, depth=None, show_caches=False, adaptive=False, | |||
elif hasattr(x, 'co_code'): # Code object | |||
_disassemble_recursive(x, file=file, depth=depth, show_caches=show_caches, adaptive=adaptive, show_offsets=show_offsets) | |||
elif isinstance(x, (bytes, bytearray)): # Raw bytecode | |||
_disassemble_bytes(x, file=file, show_caches=show_caches, show_offsets=show_offsets) |
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.
Why does this need different handling now?
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.
It's not different handling, just different argument types. If we pass around the arg_resolver
and formatter
then we can plug in different implementations of them.
…s lookup to the arg_resolver. Reduce the number of parameters passed around. (python#113108)
…s lookup to the arg_resolver. Reduce the number of parameters passed around. (python#113108)
…s lookup to the arg_resolver. Reduce the number of parameters passed around. (python#113108)
This continues the refactor of dis.