Squeak Class Documentation category index | class index  
 
LeafNode
  category: System-Compiler
  superclass: ParseNode
  subclasses: SelectorNode VariableNode LiteralNode

I represent a leaf node of the compiler parse tree. I am abstract.

Types (defined in class ParseNode):
1 LdInstType (which uses class VariableNode)
2 LdTempType (which uses class VariableNode)
3 LdLitType (which uses class LiteralNode)
4 LdLitIndType (which uses class VariableNode)
5 SendType (which uses class SelectorNode).

Note that Squeak departs slightly from the Blue Book bytecode spec.

In order to allow access to more than 63 literals and instance variables,
bytecode 132 has been redefined as DoubleExtendedDoAnything:
byte2 byte3 Operation
(hi 3 bits) (lo 5 bits)
0 nargs lit index Send Literal Message 0-255
1 nargs lit index Super-Send Lit Msg 0-255
2 ignored rcvr index Push Receiver Variable 0-255
3 ignored lit index Push Literal Constant 0-255
4 ignored lit index Push Literal Variable 0-255
5 ignored rcvr index Store Receiver Variable 0-255
6 ignored rcvr index Store-pop Receiver Variable 0-255
7 ignored lit index Store Literal Variable 0-255

This has allowed bytecode 134 also to be redefined as a second extended send
that can access literals up to 64 for nargs up to 3 without needing three bytes.
It is just like 131, except that the extension byte is aallllll instead of aaalllll,
where aaa are bits of argument count, and lll are bits of literal index.

instance methods
  accessing
  key

  code generation
  code
emitForEffect:on:
emitLong:on:
reserve:
sizeForEffect:
sizeForValue:

  copying
  veryDeepFixupWith:
veryDeepInner:

  initialize-release
  key:code:
key:index:type:
name:key:code:
name:key:index:type:

  private
  code:type:

class methods
  no messages
 

instance methods
  accessing top  
 

key


  code generation top  
 

code


 

emitForEffect:on:


 

emitLong:on:

Emit extended variable access.


 

reserve:

If this is a yet unused literal of type -code, reserve it.


 

sizeForEffect:


 

sizeForValue:


  copying top  
 

veryDeepFixupWith:

If fields were weakly copied, fix them here. If they were in the tree being copied, fix them up, otherwise point to the originals!!


 

veryDeepInner:

Copy all of my instance variables. Some need to be not copied at all, but shared. Warning!! Every instance variable defined in this class must be handled. We must also implement veryDeepFixupWith:. See DeepCopier class comment.


  initialize-release top  
 

key:code:


 

key:index:type:


 

name:key:code:


 

name:key:index:type:


  private top  
 

code:type:


class methods
  no messages top