public abstract class IRScope extends Object implements ParseResult
Modifier and Type | Field and Description |
---|---|
protected ArgumentDescriptor[] |
argDesc |
protected int |
booleanVariableIndex |
protected int |
fixnumVariableIndex |
protected int |
floatVariableIndex |
protected FullInterpreterContext |
fullInterpreterContext
-X-C full interpretation OR JIT depends on this
|
protected InterpreterContext |
interpreterContext
Startup interpretation depends on this
|
static Logger |
LOG |
protected int |
temporaryVariableIndex |
protected int |
threadPollInstrsCount
# of thread poll instrs added to this scope
|
Modifier | Constructor and Description |
---|---|
|
IRScope(IRManager manager,
IRScope lexicalParent,
String name,
String fileName,
int lineNumber,
StaticScope staticScope) |
protected |
IRScope(IRScope s,
IRScope lexicalParent) |
public static final Logger LOG
protected ArgumentDescriptor[] argDesc
protected InterpreterContext interpreterContext
protected FullInterpreterContext fullInterpreterContext
protected int temporaryVariableIndex
protected int floatVariableIndex
protected int fixnumVariableIndex
protected int booleanVariableIndex
protected int threadPollInstrsCount
public IRScope(IRManager manager, IRScope lexicalParent, String name, String fileName, int lineNumber, StaticScope staticScope)
public int getScopeId()
public void setInterpreterContext(InterpreterContext interpreterContext)
protected void addChildScope(IRScope scope)
public void addClosure(IRClosure closure)
public void removeClosure(IRClosure closure)
public LocalVariable getNewFlipStateVariable()
public Label getNewLabel()
public Collection<IRClosure> getClosures()
public IRManager getManager()
public void setIsMaybeUsingRefinements()
public boolean parentMaybeUsingRefinements()
public boolean maybeUsingRefinements()
public IRScope getLexicalParent()
public StaticScope getStaticScope()
public IRMethod getNearestMethod()
public IRScope getNearestFlipVariableScope()
public IRScope getNearestTopLocalVariableScope()
public int getNearestModuleReferencingScopeDepth()
public String getName()
public void setName(String name)
public String getFileName()
public int getLineNumber()
public IRScope getTopLevelScope()
public boolean isNestedInClosure(IRClosure closure)
public void setHasLoopsFlag()
public boolean hasLoops()
public boolean hasExplicitCallProtocol()
public void setExplicitCallProtocolFlag()
public boolean receivesKeywordArgs()
public boolean bindingHasEscaped()
public boolean usesBackrefOrLastline()
public boolean usesEval()
public boolean usesZSuper()
public boolean canReceiveNonlocalReturns()
public void putLiveVariablesProblem(LiveVariablesProblem problem)
public LiveVariablesProblem getLiveVariablesProblem()
public void putStoreLocalVarPlacementProblem(StoreLocalVarPlacementProblem problem)
public StoreLocalVarPlacementProblem getStoreLocalVarPlacementProblem()
public void putUnboxableOpsAnalysisProblem(UnboxableOpsAnalysisProblem problem)
public UnboxableOpsAnalysisProblem getUnboxableOpsAnalysisProblem()
public CFG getCFG()
protected boolean isUnsafeScope()
public List<CompilerPass> getExecutedPasses()
public InterpreterContext allocateInterpreterContext(List<Instr> instructions)
public void prepareFullBuildCommon()
public FullInterpreterContext prepareFullBuild()
public BasicBlock[] prepareForInitialCompilation()
public Map<BasicBlock,Label> buildJVMExceptionTable()
public void computeScopeFlagsEarly(List<Instr> instructions)
public void computeScopeFlags()
public abstract IRScopeType getScopeType()
public String debugOutput()
public String toStringInstrs()
public LocalVariable getSelf()
public Variable getCurrentModuleVariable()
public Variable getCurrentScopeVariable()
public Map<String,LocalVariable> getLocalVariables()
public void setLocalVariables(Map<String,LocalVariable> variables)
public LocalVariable lookupExistingLVar(String name)
public ArgumentDescriptor[] getArgumentDescriptors()
public void setArgumentDescriptors(ArgumentDescriptor[] argDesc)
protected LocalVariable findExistingLocalVariable(String name, int depth)
public LocalVariable getLocalVariable(String name, int scopeDepth)
public LocalVariable getNewLocalVariable(String name, int scopeDepth)
public TemporaryLocalVariable createTemporaryVariable()
public TemporaryLocalVariable getNewTemporaryVariableFor(LocalVariable var)
public TemporaryLocalVariable getNewTemporaryVariable(TemporaryVariableType type)
public void setTemporaryVariableCount(int count)
public TemporaryVariable getYieldClosureVariable()
public TemporaryLocalVariable getNewUnboxedVariable(Class type)
public void resetTemporaryVariables()
public int getTemporaryVariablesCount()
public int getFloatVariablesCount()
public int getFixnumVariablesCount()
public int getBooleanVariablesCount()
public int getThreadPollInstrsCount()
public int getLocalVariablesCount()
public int getUsedVariablesCount()
public void setUpUseDefLocalVarMaps()
public boolean usesLocalVariable(Variable v)
public boolean definesLocalVariable(Variable v)
public boolean hasBeenBuilt()
public InterpreterContext getInterpreterContext()
public FullInterpreterContext getFullInterpreterContext()
protected void depends(Object obj)
public void resetState()
public void inlineMethod(IRScope method, RubyModule implClass, int classToken, BasicBlock basicBlock, CallBase call, boolean cloneHost)
public void recordBeginBlock(IRClosure beginBlockClosure)
protected int allocateNextPrefixedName(String prefix)
protected void resetVariableCounter(String prefix)
protected int getPrefixCountSize(String prefix)
public int getNextClosureId()
public boolean isBeginEndBlock()
public boolean isModuleBody()
public boolean isNonSingletonClassBody()
public boolean isFlipScope()
public boolean isTopLocalVariableScope()
public boolean isScriptScope()
Copyright © 2001-2015 JRuby. All Rights Reserved.