org.jruby.compiler.ir
Class IRMethod
java.lang.Object
org.jruby.compiler.ir.IRScopeImpl
org.jruby.compiler.ir.IRExecutionScope
org.jruby.compiler.ir.IRMethod
- All Implemented Interfaces:
- IRScope
public class IRMethod
- extends IRExecutionScope
Methods inherited from class org.jruby.compiler.ir.IRExecutionScope |
addClosure, allocateStaticScope, buildCFG, calculateParameterCounts, canCaptureCallersBinding, computeExecutionScopeFlags, endLoop, getCFG, getClosestMethodAncestor, getClosures, getCurrentLoop, getInstrs, getLiveLocalVariables, getSelf, modifiesCode, requiresBinding, runCompilerPassOnNestedScopes, setCodeModificationFlag, startLoop, toStringInstrs, toStringVariables |
Methods inherited from class org.jruby.compiler.ir.IRScopeImpl |
getContainer, getContainerModule, getLexicalParent, getName, getNearestModule, getNewInlineVariable, getNewLabel, getNewLabel, getNewTemporaryClosureVariable, getNewTemporaryVariable, getNextClosureId, getPrefixCountSize, getRenamedVariableSize, getStaticScope, getTemporaryVariableSize, prepareForInterpretation, recordMethodAlias, runCompilerPass, setContainer, setName, toString, unaliasMethodName |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
isInstanceMethod
public final boolean isInstanceMethod
startLabel
public final Label startLabel
endLabel
public final Label endLabel
IRMethod
public IRMethod(IRScope lexicalParent,
Operand container,
java.lang.String name,
boolean isInstanceMethod,
StaticScope staticScope)
updateVersion
public final void updateVersion()
getScopeName
public java.lang.String getScopeName()
- Specified by:
getScopeName
in class IRScopeImpl
getVersion
public CodeVersion getVersion()
addInstr
public void addInstr(Instr i)
- Description copied from interface:
IRScope
- methods and closures
- Specified by:
addInstr
in interface IRScope
- Overrides:
addInstr
in class IRExecutionScope
getCallArgs
public Operand[] getCallArgs()
isAClassRootMethod
public boolean isAClassRootMethod()
getFullyQualifiedName
public java.lang.String getFullyQualifiedName()
getDefiningIRModule
public IRModule getDefiningIRModule()
constructStaticScope
protected StaticScope constructStaticScope(StaticScope unused)
- Description copied from class:
IRExecutionScope
- Closures and Methods have different static scopes. This returns the
correct instance.
- Specified by:
constructStaticScope
in class IRExecutionScope
- Parameters:
unused
- scope should be non-null for all closures and null for methods
- Returns:
- a newly allocated static scope
getLocalVariable
public LocalVariable getLocalVariable(java.lang.String name)
- Description copied from interface:
IRScope
- Get Local Variable from this scope
- Specified by:
getLocalVariable
in interface IRScope
- Overrides:
getLocalVariable
in class IRExecutionScope
assignBindingSlot
public int assignBindingSlot(java.lang.String varName)
getBindingSlot
public java.lang.Integer getBindingSlot(java.lang.String varName)
getBindingSlotsCount
public int getBindingSlotsCount()
getLocalVariablesCount
public int getLocalVariablesCount()
- Overrides:
getLocalVariablesCount
in class IRExecutionScope
Copyright © 2002-2009 JRuby Team. All Rights Reserved.