org.jruby.compiler.impl
Class AbstractVariableCompiler

java.lang.Object
  extended by org.jruby.compiler.impl.AbstractVariableCompiler
All Implemented Interfaces:
VariableCompiler
Direct Known Subclasses:
HeapBasedVariableCompiler, StackBasedVariableCompiler

public abstract class AbstractVariableCompiler
extends java.lang.Object
implements VariableCompiler

Author:
headius

Field Summary
protected  int argsIndex
           
protected  Arity arity
           
protected  SkinnyMethodAdapter method
           
protected  BaseBodyCompiler methodCompiler
           
protected  StaticScope scope
           
protected  boolean specificArity
           
protected  int tempVariableIndex
           
 
Constructor Summary
AbstractVariableCompiler(BaseBodyCompiler methodCompiler, SkinnyMethodAdapter method, StaticScope scope, boolean specificArity, int argsIndex, int firstTempIndex)
           
 
Method Summary
 void assignBackRef()
           
 void assignBackRef(CompilerCallback value)
           
protected  void assignHeapLocal(CompilerCallback value, int depth, int index)
           
protected  void assignHeapLocal(int depth, int index)
           
 void assignLastLine()
           
 void assignLastLine(CompilerCallback value)
           
 void assignMethodArguments(java.lang.Object requiredArgs, int requiredArgsCount, java.lang.Object optArgs, int optArgsCount, ArrayCallback requiredAssignment, ArrayCallback optGivenAssignment, ArrayCallback optNotGivenAssignment, CompilerCallback restAssignment, CompilerCallback blockAssignment)
           
 void checkMethodArity(int requiredArgs, int optArgs, int restArg)
           
 SkinnyMethodAdapter getMethodAdapter()
           
 void getTempLocal(int index)
           
 int grabTempLocal()
           
 void releaseTempLocal()
           
 void retrieveBackRef()
           
protected  void retrieveHeapLocal(int depth, int index)
           
 void retrieveLastLine()
           
 void setMethodAdapter(SkinnyMethodAdapter sma)
           
 void setTempLocal(int index)
           
protected  void unwrapParentScopes(int depth)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jruby.compiler.VariableCompiler
assignLocalVariable, assignLocalVariable, assignLocalVariable, beginClass, beginClosure, beginMethod, declareLocals, retrieveLocalVariable, retrieveLocalVariable
 

Field Detail

method

protected SkinnyMethodAdapter method

methodCompiler

protected BaseBodyCompiler methodCompiler

argsIndex

protected int argsIndex

tempVariableIndex

protected int tempVariableIndex

arity

protected Arity arity

scope

protected StaticScope scope

specificArity

protected boolean specificArity
Constructor Detail

AbstractVariableCompiler

public AbstractVariableCompiler(BaseBodyCompiler methodCompiler,
                                SkinnyMethodAdapter method,
                                StaticScope scope,
                                boolean specificArity,
                                int argsIndex,
                                int firstTempIndex)
Method Detail

getMethodAdapter

public SkinnyMethodAdapter getMethodAdapter()
Specified by:
getMethodAdapter in interface VariableCompiler

setMethodAdapter

public void setMethodAdapter(SkinnyMethodAdapter sma)
Specified by:
setMethodAdapter in interface VariableCompiler

assignLastLine

public void assignLastLine()
Specified by:
assignLastLine in interface VariableCompiler

assignLastLine

public void assignLastLine(CompilerCallback value)
Specified by:
assignLastLine in interface VariableCompiler

retrieveLastLine

public void retrieveLastLine()
Specified by:
retrieveLastLine in interface VariableCompiler

assignBackRef

public void assignBackRef()
Specified by:
assignBackRef in interface VariableCompiler

assignBackRef

public void assignBackRef(CompilerCallback value)
Specified by:
assignBackRef in interface VariableCompiler

retrieveBackRef

public void retrieveBackRef()
Specified by:
retrieveBackRef in interface VariableCompiler

checkMethodArity

public void checkMethodArity(int requiredArgs,
                             int optArgs,
                             int restArg)
Specified by:
checkMethodArity in interface VariableCompiler

assignMethodArguments

public void assignMethodArguments(java.lang.Object requiredArgs,
                                  int requiredArgsCount,
                                  java.lang.Object optArgs,
                                  int optArgsCount,
                                  ArrayCallback requiredAssignment,
                                  ArrayCallback optGivenAssignment,
                                  ArrayCallback optNotGivenAssignment,
                                  CompilerCallback restAssignment,
                                  CompilerCallback blockAssignment)
Specified by:
assignMethodArguments in interface VariableCompiler

grabTempLocal

public int grabTempLocal()
Specified by:
grabTempLocal in interface VariableCompiler

setTempLocal

public void setTempLocal(int index)
Specified by:
setTempLocal in interface VariableCompiler

getTempLocal

public void getTempLocal(int index)
Specified by:
getTempLocal in interface VariableCompiler

releaseTempLocal

public void releaseTempLocal()
Specified by:
releaseTempLocal in interface VariableCompiler

assignHeapLocal

protected void assignHeapLocal(CompilerCallback value,
                               int depth,
                               int index)

assignHeapLocal

protected void assignHeapLocal(int depth,
                               int index)

retrieveHeapLocal

protected void retrieveHeapLocal(int depth,
                                 int index)

unwrapParentScopes

protected void unwrapParentScopes(int depth)


Copyright © 2002-2007 JRuby Team. All Rights Reserved.