Squeak Class Documentation category index | class index  
 
Encoder
  category: System-Compiler
  superclass: ParseNode
  subclasses:

I encode names and literals into tree nodes with byte codes for the compiler. Byte codes for literals are not assigned until the tree-sizing pass of the compiler, because only then is it known which literals are actually needed. I also keep track of sourceCode ranges during parsing and code generation so I can provide an inverse map for the debugger.

instance methods
  encoding
  cantStoreInto:
encodeLiteral:
encodeSelector:
encodeVariable:
encodeVariable:ifUnknown:
encodeVariable:sourceRange:ifUnknown:
litIndex:
sharableLitIndex:
undeclared:

  error handling
  notify:
notify:at:
requestor:

  initialize-release
  fillDict:with:mapping:to:
init:context:notifying:
initScopeAndLiteralTables
nTemps:literals:class:
noteSuper
release

  private
  classEncoding
global:name:
lookupInPools:ifFound:
name:key:class:type:set:
possibleVariablesFor:
reallyBind:

  results
  allLiterals
associationFor:
literals
tempNames
tempNodes
tempsAndBlockArgs
unusedTempNames

  source mapping
  globalSourceRanges
noteSourceRange:forNode:
rawSourceRanges
sourceMap

  temps
  autoBind:
bindAndJuggle:
bindArg:
bindBlockTemp:
bindTemp:
maxTemp
newTemp:

class methods
  no messages
 

instance methods
  encoding top  
 

cantStoreInto:


 

encodeLiteral:


 

encodeSelector:


 

encodeVariable:


 

encodeVariable:ifUnknown:


 

encodeVariable:sourceRange:ifUnknown:


 

litIndex:


 

sharableLitIndex:

Special access prevents multiple entries for post-allocated super send special selectors


 

undeclared:


  error handling top  
 

notify:

Put a separate notifier on top of the requestor's window


 

notify:at:

Create and schedule a Notifier with the argument as the message in
order to request confirmation before a process can proceed. Subclasses can
override this and insert an error message at location within aString.


 

requestor:

Often the requestor is a BrowserCodeController


  initialize-release top  
 

fillDict:with:mapping:to:


 

init:context:notifying:


 

initScopeAndLiteralTables


 

nTemps:literals:class:

Decompile.


 

noteSuper


 

release

Remove references to objects that may refer to the receiver. This message
should be overridden by subclasses with any cycles, in which case the
subclass should also include the expression super release.


  private top  
 

classEncoding

This is a hack so that the parser may findout what class it was parsing for when it wants to create a syntax error view.


 

global:name:


 

lookupInPools:ifFound:


 

name:key:class:type:set:


 

possibleVariablesFor:


 

reallyBind:


  results top  
 

allLiterals


 

associationFor:


 

literals

Should only be used for decompiling primitives


 

tempNames


 

tempNodes


 

tempsAndBlockArgs


 

unusedTempNames


  source mapping top  
 

globalSourceRanges


 

noteSourceRange:forNode:


 

rawSourceRanges


 

sourceMap

Answer with a sorted set of associations (pc range).


  temps top  
 

autoBind:

Declare a block argument as a temp if not already declared.


 

bindAndJuggle:


 

bindArg:

Declare an argument.


 

bindBlockTemp:

Declare a temporary block variable; complain if it's not a field or class variable.


 

bindTemp:

Declare a temporary; error not if a field or class variable.


 

maxTemp


 

newTemp:


class methods
  no messages top