Top Description Fields Constructors Methods
org.jruby.ir.interpreter

public Class ClosureInterpreterContext

extends InterpreterContext
Class Inheritance
Imports
java.util.EnumSet, .List, java.util.function.Supplier, org.jruby.ir.IRClosure, .IRFlags, org.jruby.ir.instructions.Instr, org.jruby.runtime.DynamicScope, .ThreadContext

Interpreter knowledge needed to interpret a closure.

Field Summary

Inherited from org.jruby.ir.interpreter.InterpreterContext:
dynamicScopeEliminatedhasExplicitCallProtocolinstructionsinstructionsCallbackrescueIPCstemporaryVariableCount

Constructor Summary

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

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

Method Summary

Modifier and TypeMethod and Description
public DynamicScope
newDynamicScope(ThreadContext context)

Overrides org.jruby.ir.interpreter.InterpreterContext.newDynamicScope.

Blocks have more complicated logic for pushing a dynamic scope (see InterpretedIRBlockBody).

Inherited from org.jruby.ir.interpreter.InterpreterContext:
allocateTemporaryBooleanVariablesallocateTemporaryFixnumVariablesallocateTemporaryFloatVariablesallocateTemporaryVariablescomputeScopeFlagsFromInstructionsgetCFGgetEnginegetFileNamegetFlagsgetInstructionsgetLinegetNamegetRequiredArgsCountgetRescueIPCsgetScopegetStaticScopegetTemporaryVariableCounthasExplicitCallProtocolinitializeisDynamicScopeEliminatedisENDisRuby2KeywordspopDynScopepushNewDynScopereceivesKeywordArgumentsreuseParentDynScopesetDynamicScopeEliminatedsetExplicitCallProtocolsetReuseParentDynScopetoStringtoStringInstrs

Constructor Detail

ClosureInterpreterContextback to summary
public ClosureInterpreterContext(IRClosure scope, List<Instr> instructions, int temporaryVariableCount, EnumSet<IRFlags> flags)
ClosureInterpreterContextback to summary
public ClosureInterpreterContext(IRClosure scope, Supplier<List<Instr>> instructions, int temporaryVariableCount, EnumSet<IRFlags> flags)

Method Detail

newDynamicScopeback to summary
public DynamicScope newDynamicScope(ThreadContext context)

Overrides org.jruby.ir.interpreter.InterpreterContext.newDynamicScope.

Blocks have more complicated logic for pushing a dynamic scope (see InterpretedIRBlockBody). We throw an error in case somehow we mistakenly try and push a binding.

Annotations
@Override