Squeak Class Documentation category index | class index  
 
InstructionPrinter
  category: Kernel-Methods
  superclass: InstructionStream
  subclasses:

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 inherited variable, sender, is used in an ugly way to hold the method being printed.

instance methods
  initialize-release
  printInstructionsOn:

  instruction decoding
  blockReturnTop
doDup
doPop
jump:
jump:if:
methodReturnConstant:
methodReturnReceiver
methodReturnTop
popIntoLiteralVariable:
popIntoReceiverVariable:
popIntoTemporaryVariable:
pushActiveContext
pushConstant:
pushLiteralVariable:
pushReceiver
pushReceiverVariable:
pushTemporaryVariable:
send:super:numArgs:
storeIntoLiteralVariable:
storeIntoReceiverVariable:
storeIntoTemporaryVariable:

  printing
  print:

class methods
  printing
  printClass:

instance methods
  initialize-release top  
 

printInstructionsOn:

Append to the stream, aStream, a description of each bytecode in the
instruction stream.


  instruction decoding top  
 

blockReturnTop

Print the Return Top Of Stack bytecode.


 

doDup

Print the Duplicate Top Of Stack bytecode.


 

doPop

Print the Remove Top Of Stack bytecode.


 

jump:

Print the Unconditional Jump bytecode.


 

jump:if:

Print the Conditional Jump bytecode.


 

methodReturnConstant:

Print the Return Constant bytecode.


 

methodReturnReceiver

Print the Return Self bytecode.


 

methodReturnTop

Print the Return Top Of Stack bytecode.


 

popIntoLiteralVariable:

Print the Remove Top Of Stack And Store Into Literal Variable bytecode.


 

popIntoReceiverVariable:

Print the Remove Top Of Stack And Store Into Instance Variable
bytecode.


 

popIntoTemporaryVariable:

Print the Remove Top Of Stack And Store Into Temporary Variable
bytecode.


 

pushActiveContext

Print the Push Active Context On Top Of Its Own Stack bytecode.


 

pushConstant:

Print the Push Constant, value, on Top Of Stack bytecode.


 

pushLiteralVariable:

Print the Push Contents Of anAssociation On Top Of Stack bytecode.


 

pushReceiver

Print the Push Active Context's Receiver on Top Of Stack bytecode.


 

pushReceiverVariable:

Print the Push Contents Of the Receiver's Instance Variable Whose Index
is the argument, offset, On Top Of Stack bytecode.


 

pushTemporaryVariable:

Print the Push Contents Of Temporary Variable Whose Index Is the
argument, offset, On Top Of Stack bytecode.


 

send:super:numArgs:

Print the Send Message With Selector, selector, bytecode. The argument,
supered, indicates whether the receiver of the message is specified with
'super' in the source method. The arguments of the message are found in
the top numArguments locations on the stack and the receiver just
below them.


 

storeIntoLiteralVariable:

Print the Store Top Of Stack Into Literal Variable Of Method bytecode.


 

storeIntoReceiverVariable:

Print the Store Top Of Stack Into Instance Variable Of Method bytecode.


 

storeIntoTemporaryVariable:

Print the Store Top Of Stack Into Temporary Variable Of Method
bytecode.


  printing top  
 

print:

Append to the receiver a description of the bytecode, instruction.


class methods
  printing top  
 

printClass:

Create a file whose name is the argument followed by '.bytes'. Store on
the file the symbolic form of the compiled methods of the class.