Squeak Class Documentation category index | class index  
 
VariableNode
  category: System-Compiler
  superclass: LeafNode
  subclasses: TempVariableNode LiteralVariableNode

I am a parse tree leaf representing a variable. Note that my name and key are different for pool variables: the key is the Object Reference.

instance methods
  C translation
  asTranslatorNode

  accessing
  name

  code generation
  emitForReturn:on:
emitForValue:on:
emitLoad:on:
emitStore:on:
emitStorePop:on:
fieldOffset
sizeForReturn:
sizeForStore:
sizeForStorePop:

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

  printing
  printOn:indent:

  testing
  assignmentCheck:at:
canBeSpecialArgument
index
isSelfPseudoVariable
isVariableReference
type

  tiles
  asMorphicSyntaxIn:
currentValueIn:
explanation
variableGetterBlockIn:

class methods
  class initialization
  initialize

instance methods
  C translation top  
 

asTranslatorNode


  accessing top  
 

name

Answer a name for the receiver. This is used generically in the title of certain inspectors, such as the referred-to inspector, and specificially by various subsystems. By default, we let the object just print itself out..


  code generation top  
 

emitForReturn:on:


 

emitForValue:on:


 

emitLoad:on:

Do nothing


 

emitStore:on:


 

emitStorePop:on:


 

fieldOffset

Return temp or instVar offset for this variable


 

sizeForReturn:


 

sizeForStore:


 

sizeForStorePop:


  initialize-release top  
 

asStorableNode:


 

name:

Change name


 

name:index:type:

Only used for initting instVar refs


 

name:key:code:

Only used for initting std variables, nil, true, false, self, etc.


 

name:key:index:type:

Only used for initting global (litInd) variables


  printing top  
 

printOn:indent:

If control gets here, avoid recursion loop.


  testing top  
 

assignmentCheck:at:

For messageNodes masquerading as variables for the debugger.
For now we let this through - ie we allow stores ev
into args. Should check against numArgs, though.


 

canBeSpecialArgument

Can I be an argument of (e.g.) ifTrue:?


 

index

This code attempts to reconstruct the index from its encoding in code.


 

isSelfPseudoVariable

Answer if this ParseNode represents the 'self' pseudo-variable.


 

isVariableReference


 

type

This code attempts to reconstruct the type from its encoding in code.
This allows one to test, for instance, (aNode type = LdInstType).


  tiles top  
 

asMorphicSyntaxIn:

Default for missing implementations


 

currentValueIn:


 

explanation


 

variableGetterBlockIn:


class methods
  class initialization top  
 

initialize

VariableNode initialize. Decompiler initialize