!InstructionPrinter commentStamp: 'md 4/8/2003 12:47' prior: 0!
My instances can print the object code of a CompiledMethod in symbolic format. They print into an instance variable, stream, and uses oldPC to determine how many bytes to print in the listing. The variable method is used to hold the method being printed.!
Item was changed:
----- Method: InstructionPrinter>>printInstructionsOn: (in category 'initialize-release') -----
"Append to the stream, aStream, a description of each bytecode in the
| end |
stream := aStream.
scanner := InstructionStream on: method.
end := method endPC.
oldPC := scanner pc.
innerIndents := Array new: end withAll: 0.
+ fullBlockRecursionSelector := #printInstructionsOn:.
[scanner pc <= end] whileTrue:
[scanner interpretNextInstructionFor: self]!