jruby/docs BETA
Navigation
org.jruby.ir.interpreter 10
C ClosureInterpreterContext
C ExitableInterpreterContext
C ExitableInterpreterEngine
C ExitableInterpreterEngineState
C FullInterpreterContext
C Interpreter
C InterpreterContext
C InterpreterEngine
C Profiler
C StartupInterpreterEngine
ClosureInterpreterContext — members 3+
C new(scope, instructions, temporary_variable_count, flags)
C new(scope, instructions, temporary_variable_count, flags)
M new_dynamic_scope(context) DynamicScope
from InterpreterContext
F instructionsCallback Instr>>
M allocate_temporary_boolean_variables() boolean[]
M allocate_temporary_fixnum_variables() long[]
M allocate_temporary_float_variables() double[]
M allocate_temporary_variables() Object[]
M cfg() CFG
C compute_scope_flags_from_instructions()
C dynamic_scope_eliminated=(dynamic_scope_eliminated)
M dynamic_scope_eliminated?() boolean
M end?() boolean
M engine() InterpreterEngine
C explicit_call_protocol=(call_protocol)
M file_name() String
M flags() IRFlags>
M has_explicit_call_protocol?() boolean
M instructions() Instr[]
M line() int
M name() RubySymbol
M pop_dyn_scope() boolean
M push_new_dyn_scope() boolean
M receives_keyword_arguments() boolean
M required_args_count() int
M rescue_ip_cs() int[]
M reuse_parent_dyn_scope() boolean
C reuse_parent_dyn_scope=(reuse_parent_dyn_scope)
M ruby2_keywords?() boolean
M scope() IRScope
M static_scope() StaticScope
M temporary_variable_count() int
M to_string() String
M to_string_instrs() String

org.jruby.ir.interpreter.ClosureInterpreterContext

class extends InterpreterContext 3 members

Interpreter knowledge needed to interpret a closure.

Constructors

new

new ( IRClosure scope, List<Instr> instructions, int temporary_variable_count, EnumSet<IRFlags> flags )
Java: <init>(org.jruby.ir.IRClosure scope, List<org.jruby.ir.instructions.Instr> instructions, int temporaryVariableCount, EnumSet<org.jruby.ir.IRFlags> flags)

new

new ( IRClosure scope, Supplier<List<Instr>> instructions, int temporary_variable_count, EnumSet<IRFlags> flags )
Java: <init>(org.jruby.ir.IRClosure scope, java.util.function.Supplier<List<org.jruby.ir.instructions.Instr>> instructions, int temporaryVariableCount, EnumSet<org.jruby.ir.IRFlags> flags)

Instance Methods

new_dynamic_scope

DynamicScope new_dynamic_scope ( ThreadContext context )
Java: newDynamicScope(org.jruby.runtime.ThreadContext context)

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.

Inherited

from InterpreterContext

fieldtypenote
instructionsCallback Supplier<List<Instr>>

allocate_temporary_boolean_variables

boolean[] allocate_temporary_boolean_variables ( )
Java: allocateTemporaryBooleanVariables()

allocate_temporary_fixnum_variables

long[] allocate_temporary_fixnum_variables ( )
Java: allocateTemporaryFixnumVariables()

allocate_temporary_float_variables

double[] allocate_temporary_float_variables ( )
Java: allocateTemporaryFloatVariables()

allocate_temporary_variables

Object[] allocate_temporary_variables ( )
Java: allocateTemporaryVariables()

cfg

CFG cfg ( )
Java: getCFG() · also: get_cfg

compute_scope_flags_from_instructions

compute_scope_flags_from_instructions ( )
Java: computeScopeFlagsFromInstructions()

dynamic_scope_eliminated=

dynamic_scope_eliminated= ( boolean dynamic_scope_eliminated )
Java: setDynamicScopeEliminated(boolean dynamicScopeEliminated) · also: set_dynamic_scope_eliminated

dynamic_scope_eliminated?

boolean dynamic_scope_eliminated? ( )
Java: isDynamicScopeEliminated() · also: is_dynamic_scope_eliminated

end?

boolean end? ( )
Java: isEND() · also: is_end

engine

InterpreterEngine engine ( )
Java: getEngine() · also: get_engine

explicit_call_protocol=

explicit_call_protocol= ( boolean call_protocol )
Java: setExplicitCallProtocol(boolean callProtocol) · also: set_explicit_call_protocol

file_name

String file_name ( )
Java: getFileName() · also: get_file_name

flags

EnumSet<IRFlags> flags ( )
Java: getFlags() · also: get_flags

has_explicit_call_protocol?

boolean has_explicit_call_protocol? ( )
Java: hasExplicitCallProtocol() · also: has_explicit_call_protocol

instructions

Instr[] instructions ( )
Java: getInstructions() · also: get_instructions

line

int line ( )
Java: getLine() · also: get_line

name

RubySymbol name ( )
Java: getName() · also: get_name

pop_dyn_scope

boolean pop_dyn_scope ( )
Java: popDynScope()

push_new_dyn_scope

boolean push_new_dyn_scope ( )
Java: pushNewDynScope()

receives_keyword_arguments

boolean receives_keyword_arguments ( )
Java: receivesKeywordArguments()

required_args_count

int required_args_count ( )
Java: getRequiredArgsCount() · also: get_required_args_count

rescue_ip_cs

int[] rescue_ip_cs ( )
Java: getRescueIPCs() · also: get_rescue_ip_cs

reuse_parent_dyn_scope

boolean reuse_parent_dyn_scope ( )
Java: reuseParentDynScope()

reuse_parent_dyn_scope=

reuse_parent_dyn_scope= ( boolean reuse_parent_dyn_scope )
Java: setReuseParentDynScope(boolean reuseParentDynScope) · also: set_reuse_parent_dyn_scope

ruby2_keywords?

boolean ruby2_keywords? ( )
Java: isRuby2Keywords() · also: is_ruby2_keywords

scope

IRScope scope ( )
Java: getScope() · also: get_scope

static_scope

StaticScope static_scope ( )
Java: getStaticScope() · also: get_static_scope

temporary_variable_count

int temporary_variable_count ( )
Java: getTemporaryVariableCount() · also: get_temporary_variable_count

to_string

String to_string ( )
Java: toString()

to_string_instrs

String to_string_instrs ( )
Java: toStringInstrs()