Closed
Description
The dis module is not very flexible, because the formatting and instruction creation are all entangled with one another. I will refactor it so that we are able to feed an instruction sequence to a formatter, or to plug in a different formatter into dis functions.
Linked PRs
- gh-112720: Move instruction formatting from the dis.Instruction class to a new class dis.InstructionFormatter. Add the ArgResolver class. #112722
- 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
- gh-112720: make it easier to subclass and modify dis.ArgResolver's jump arg resolution #115564