public abstract class IRScope extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
IRScope.LocalVariableAllocator |
Modifier and Type | Field and Description |
---|---|
protected boolean |
canReceiveBreaks
Can this scope receive breaks
|
boolean |
canReceiveNonlocalReturns
Can this scope receive a non-local return?
|
protected boolean |
hasBreakInstrs
Does this scope have a break instr?
|
protected boolean |
hasNonlocalReturns
Does this scope have a non-local return instr?
|
protected int |
temporaryVariableIndex |
Modifier | Constructor and Description |
---|---|
|
IRScope(IRManager manager,
IRScope lexicalParent,
String name,
String fileName,
int lineNumber,
StaticScope staticScope) |
protected |
IRScope(IRScope s,
IRScope lexicalParent) |
protected int temporaryVariableIndex
protected boolean hasBreakInstrs
protected boolean canReceiveBreaks
protected boolean hasNonlocalReturns
public boolean canReceiveNonlocalReturns
public IRScope(IRManager manager, IRScope lexicalParent, String name, String fileName, int lineNumber, StaticScope staticScope)
public int getScopeId()
protected void addChildScope(IRScope scope)
public void addClosure(IRClosure c)
public Instr getLastInstr()
public void addInstrAtBeginning(Instr i)
public void addInstr(Instr i)
public LocalVariable getNewFlipStateVariable()
public boolean isForLoopBody()
public Label getNewLabel()
public IRManager getManager()
public IRScope getLexicalParent()
public StaticScope getStaticScope()
public IRMethod getNearestMethod()
public IRScope getNearestFlipVariableScope()
public IRScope getNearestTopLocalVariableScope()
public IRScope getNearestModuleReferencingScope()
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(boolean f)
public boolean hasLoops()
public boolean hasExplicitCallProtocol()
public void setExplicitCallProtocolFlag(boolean flag)
public void setCodeModificationFlag(boolean f)
public boolean receivesKeywordArgs()
public boolean modifiesCode()
public boolean bindingHasEscaped()
public boolean usesBackrefOrLastline()
public boolean usesEval()
public boolean usesZSuper()
public boolean canCaptureCallersBinding()
public boolean canReceiveNonlocalReturns()
public CFG buildCFG()
protected void setCFG(CFG cfg)
public CFG getCFG()
public Instr[] prepareForInterpretation(boolean isLambda)
public Tuple<Instr[],Map<Integer,Label[]>> prepareForCompilation()
public void computeScopeFlags()
public abstract String getScopeName()
public String toStringInstrs()
public String toPersistableString()
public String toStringVariables()
public LocalVariable getSelf()
public Variable getCurrentModuleVariable()
public Variable getCurrentScopeVariable()
public abstract LocalVariable getImplicitBlockArg()
public void markUnusedImplicitBlockArg()
public LocalVariable findExistingLocalVariable(String name, int depth)
public LocalVariable getLocalVariable(String name, int scopeDepth)
public LocalVariable getNewLocalVariable(String name, int depth)
protected void initEvalScopeVariableAllocator(boolean reset)
public TemporaryVariable getNewTemporaryVariable()
public TemporaryVariable getNewTemporaryVariable(String name)
public void resetTemporaryVariables()
public int getTemporaryVariableSize()
public int getThreadPollInstrsCount()
public int getLocalVariablesCount()
public int getUsedVariablesCount()
public void setUpUseDefLocalVarMaps()
public boolean usesLocalVariable(Variable v)
public boolean definesLocalVariable(Variable v)
public void setDataFlowSolution(String name, DataFlowProblem p)
public DataFlowProblem getDataFlowSolution(String name)
public Instr[] getInstrsForInterpretation()
public void resetLinearizationData()
public void checkRelinearization()
public List<BasicBlock> buildLinearization()
public int getRescuerPC(Instr excInstr)
public int getEnsurerPC(Instr excInstr)
public List<BasicBlock> linearization()
protected void depends(Object obj)
public CFG cfg()
public void splitCalls()
public void resetDFProblemsState()
public void resetState()
public void inlineMethod(IRScope method, RubyModule implClass, int classToken, BasicBlock basicBlock, CallBase call)
public void resetCFG()
public void recordBeginBlock(IRClosure beginBlockClosure)
public void recordEndBlock(IRClosure endBlockClosure)
protected int allocateNextPrefixedName(String prefix)
protected void resetVariableCounter(String prefix)
protected int getPrefixCountSize(String prefix)
public RubyModule getContainerModule()
public int getNextClosureId()
public boolean isModuleBody()
public boolean isNonSingletonClassBody()
public boolean isFlipScope()
public boolean isTopLocalVariableScope()
public boolean isScriptScope()
Copyright © 2001-2014 JRuby. All Rights Reserved.