Top Fields Constructors Methods
org.jruby.ir.interpreter

public Class InterpreterContext

extends Object
Class Inheritance
Known Direct Subclasses
org.jruby.ir.interpreter.ClosureInterpreterContext, org.jruby.ir.interpreter.ExitableInterpreterContext, org.jruby.ir.interpreter.FullInterpreterContext
Imports
java.util.ArrayDeque, .Deque, .EnumSet, .List, java.util.function.Supplier, org.jruby.RubySymbol, org.jruby.ir.IRClosure, .IRFlags, .IRMetaClassBody, .IRScope, org.jruby.ir.instructions.ExceptionRegionEndMarkerInstr, .ExceptionRegionStartMarkerInstr, .Instr, .LabelInstr, org.jruby.ir.representations.CFG, org.jruby.parser.StaticScope, org.jruby.runtime.DynamicScope, .ThreadContext

Field Summary

Modifier and TypeField and Description
private static final InterpreterEngine
protected boolean
private InterpreterEngine
private final EnumSet<IRFlags>
protected boolean
protected volatile Instr[]
public final Supplier<List<Instr>>
private final boolean
private final boolean
private static final Instr[]
protected volatile int[]
private boolean
private final IRScope
private static final InterpreterEngine
protected int

Constructor Summary

AccessConstructor and Description
public
InterpreterContext(IRScope scope, List<Instr> instructions, int temporaryVariableCount, EnumSet<IRFlags> flags)

public
InterpreterContext(IRScope scope, Supplier<List<Instr>> instructions, int temporaryVariableCount, EnumSet<IRFlags> flags)

Method Summary

Modifier and TypeMethod and Description
public boolean[]
public long[]
public double[]
public Object[]
public void
public CFG
public InterpreterEngine
public String
public EnumSet<IRFlags>
public Instr[]
public int
public RubySymbol
public int
public int[]
public IRScope
public StaticScope
public int
public boolean
protected void
public boolean
public boolean
public boolean
public DynamicScope
newDynamicScope(ThreadContext context)

Get a new dynamic scope.

public boolean
private Instr[]
public boolean
public boolean
public boolean
public void
setDynamicScopeEliminated(boolean dynamicScopeEliminated)

public void
setExplicitCallProtocol(boolean callProtocol)

private synchronized void
setInstructions(final List<Instr> instructions)

public void
setReuseParentDynScope(boolean reuseParentDynScope)

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

DEFAULT_INTERPRETERback to summary
private static final InterpreterEngine DEFAULT_INTERPRETER
dynamicScopeEliminatedback to summary
protected boolean dynamicScopeEliminated
engineback to summary
private InterpreterEngine engine
flagsback to summary
private final EnumSet<IRFlags> flags
hasExplicitCallProtocolback to summary
protected boolean hasExplicitCallProtocol
instructionsback to summary
protected volatile Instr[] instructions
instructionsCallbackback to summary
public final Supplier<List<Instr>> instructionsCallback
isENDback to summary
private final boolean isEND
metaClassBodyScopeback to summary
private final boolean metaClassBodyScope
NO_INSTRUCTIONSback to summary
private static final Instr[] NO_INSTRUCTIONS
rescueIPCsback to summary
protected volatile int[] rescueIPCs
reuseParentDynScopeback to summary
private boolean reuseParentDynScope
scopeback to summary
private final IRScope scope
STARTUP_INTERPRETERback to summary
private static final InterpreterEngine STARTUP_INTERPRETER
temporaryVariableCountback to summary
protected int temporaryVariableCount

Constructor Detail

InterpreterContextback to summary
public InterpreterContext(IRScope scope, List<Instr> instructions, int temporaryVariableCount, EnumSet<IRFlags> flags)
InterpreterContextback to summary
public InterpreterContext(IRScope scope, Supplier<List<Instr>> instructions, int temporaryVariableCount, EnumSet<IRFlags> flags)

Method Detail

allocateTemporaryBooleanVariablesback to summary
public boolean[] allocateTemporaryBooleanVariables()
allocateTemporaryFixnumVariablesback to summary
public long[] allocateTemporaryFixnumVariables()
allocateTemporaryFloatVariablesback to summary
public double[] allocateTemporaryFloatVariables()
allocateTemporaryVariablesback to summary
public Object[] allocateTemporaryVariables()
computeScopeFlagsFromInstructionsback to summary
public void computeScopeFlagsFromInstructions()
getCFGback to summary
public CFG getCFG()
getEngineback to summary
public InterpreterEngine getEngine()
getFileNameback to summary
public String getFileName()
getFlagsback to summary
public EnumSet<IRFlags> getFlags()
getInstructionsback to summary
public Instr[] getInstructions()
getLineback to summary
public int getLine()
getNameback to summary
public RubySymbol getName()
getRequiredArgsCountback to summary
public int getRequiredArgsCount()
getRescueIPCsback to summary
public int[] getRescueIPCs()
getScopeback to summary
public IRScope getScope()
getStaticScopeback to summary
public StaticScope getStaticScope()
getTemporaryVariableCountback to summary
public int getTemporaryVariableCount()
hasExplicitCallProtocolback to summary
public boolean hasExplicitCallProtocol()
initializeback to summary
protected void initialize()
isDynamicScopeEliminatedback to summary
public boolean isDynamicScopeEliminated()
isENDback to summary
public boolean isEND()
isRuby2Keywordsback to summary
public boolean isRuby2Keywords()
newDynamicScopeback to summary
public DynamicScope newDynamicScope(ThreadContext context)

Get a new dynamic scope.

Note

This only works for method scopes (ClosureIC will throw).

popDynScopeback to summary
public boolean popDynScope()
prepareBuildInstructionsback to summary
private Instr[] prepareBuildInstructions(List<Instr> instructions)
pushNewDynScopeback to summary
public boolean pushNewDynScope()
receivesKeywordArgumentsback to summary
public boolean receivesKeywordArguments()
reuseParentDynScopeback to summary
public boolean reuseParentDynScope()
setDynamicScopeEliminatedback to summary
public void setDynamicScopeEliminated(boolean dynamicScopeEliminated)
setExplicitCallProtocolback to summary
public void setExplicitCallProtocol(boolean callProtocol)
setInstructionsback to summary
private synchronized void setInstructions(final List<Instr> instructions)
setReuseParentDynScopeback to summary
public void setReuseParentDynScope(boolean reuseParentDynScope)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override
toStringInstrsback to summary
public String toStringInstrs()