Top Description Constructors Methods
org.jruby.ir.interpreter

public Class InterpreterEngine

extends Object
Class Inheritance
Known Direct Subclasses
org.jruby.ir.interpreter.StartupInterpreterEngine, org.jruby.ir.interpreter.ExitableInterpreterEngine
Imports
org.jruby.RubyBoolean, .RubyFixnum, .RubyFloat, .RubyModule, .RubyNumeric, org.jruby.exceptions.Unrescuable, org.jruby.ir.Operation, org.jruby.ir.instructions.ArgReceiver, .BreakInstr, .CheckArityInstr, .CheckForLJEInstr, .CopyInstr, .FrameNameCallInstr, .Instr, .JumpInstr, .LineNumberInstr, .NonlocalReturnInstr, .PopBlockFrameInstr, .PushBlockFrameInstr, .PushMethodFrameInstr, .ReceivePostReqdArgInstr, .ReceivePreReqdArgInstr, .RestoreBindingVisibilityInstr, .ResultInstr, .ReturnBase, .RuntimeHelperCall, .SaveBindingVisibilityInstr, .ToggleBacktraceInstr, org.jruby.ir.instructions.boxing.AluInstr, .BoxBooleanInstr, .BoxFixnumInstr, .BoxFloatInstr, .BoxInstr, .UnboxInstr, org.jruby.ir.instructions.specialized.OneFixnumArgNoBlockCallInstr, .OneFloatArgNoBlockCallInstr, .OneOperandArgBlockCallInstr, .OneOperandArgNoBlockCallInstr, .OneOperandArgNoBlockNoResultCallInstr, .TwoOperandArgNoBlockCallInstr, .ZeroOperandArgNoBlockCallInstr, org.jruby.ir.operands.Bignum, .Fixnum, .Float, .LocalVariable, .Operand, .Self, .TemporaryFixnumVariable, .TemporaryFloatVariable, .TemporaryLocalVariable, .TemporaryVariable, .UnboxedBoolean, .UnboxedFixnum, .UnboxedFloat, .Variable, org.jruby.ir.runtime.IRRuntimeHelpers, org.jruby.parser.StaticScope, org.jruby.runtime.Block, .CallSite, .DynamicScope, .Frame, .Helpers, .ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject

Base full interpreter. Subclasses can use utility methods here and override what they want. This method requires that it has fully built and has had a CFG made, etc...

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected static void
private static boolean
getBooleanArg(boolean[] booleans, Operand arg)

private static long
getFixnumArg(long[] fixnums, Operand arg)

private static double
getFloatArg(double[] floats, Operand arg)

public IRubyObject
interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, Block blockArg)

public IRubyObject
interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject arg1, Block blockArg)

public IRubyObject
interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject arg1, IRubyObject arg2, Block blockArg)

public IRubyObject
interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block blockArg)

public IRubyObject
interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, Block blockArg)

public IRubyObject
interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject[] args, Block blockArg)

protected static void
interpretFloatOp(AluInstr instr, Operation op, double[] floats, boolean[] booleans)

protected static void
interpretIntOp(AluInstr instr, Operation op, long[] fixnums, boolean[] booleans)

protected static void
processBookKeepingOp(ThreadContext context, Block block, Instr instr, Operation operation, String name, IRubyObject[] args, IRubyObject self, Block blockArg, RubyModule implClass, DynamicScope currDynScope, Object[] temp, StaticScope currScope)

protected static void
processCall(ThreadContext context, Instr instr, Operation operation, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject self, String name)

protected static void
processOtherOp(ThreadContext context, Block block, Instr instr, Operation operation, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject self, double[] floats, long[] fixnums, boolean[] booleans)

protected static IRubyObject
processReturnOp(ThreadContext context, Block block, Instr instr, Operation operation, DynamicScope currDynScope, Object[] temp, IRubyObject self, StaticScope currScope)

protected static void
receiveArg(ThreadContext context, Instr i, Operation operation, IRubyObject self, IRubyObject[] args, boolean ruby2Keywords, StaticScope currScope, DynamicScope currDynScope, Object[] temp, Object exception, Block blockArg)

protected static Object
retrieveOp(Operand r, ThreadContext context, IRubyObject self, DynamicScope currDynScope, StaticScope currScope, Object[] temp)

private static void
setBooleanVar(boolean[] booleans, TemporaryLocalVariable var, boolean val)

private static void
setFixnumVar(long[] fixnums, TemporaryLocalVariable var, long val)

private static void
setFloatVar(double[] floats, TemporaryLocalVariable var, double val)

protected static void
setResult(Object[] temp, DynamicScope currDynScope, Variable resultVar, Object result)

protected static void
setResult(Object[] temp, DynamicScope currDynScope, Instr instr, Object result)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

InterpreterEngineback to summary
public InterpreterEngine()

Method Detail

extractToMethodToAvoidC2Crashback to summary
protected static void extractToMethodToAvoidC2Crash(Instr instr, Throwable t)
getBooleanArgback to summary
private static boolean getBooleanArg(boolean[] booleans, Operand arg)
getFixnumArgback to summary
private static long getFixnumArg(long[] fixnums, Operand arg)
getFloatArgback to summary
private static double getFloatArg(double[] floats, Operand arg)
interpretback to summary
public IRubyObject interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, Block blockArg)
interpretback to summary
public IRubyObject interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject arg1, Block blockArg)
interpretback to summary
public IRubyObject interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject arg1, IRubyObject arg2, Block blockArg)
interpretback to summary
public IRubyObject interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block blockArg)
interpretback to summary
public IRubyObject interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject arg4, Block blockArg)
interpretback to summary
public IRubyObject interpret(ThreadContext context, Block block, IRubyObject self, InterpreterContext interpreterContext, RubyModule implClass, String name, IRubyObject[] args, Block blockArg)
interpretFloatOpback to summary
protected static void interpretFloatOp(AluInstr instr, Operation op, double[] floats, boolean[] booleans)
interpretIntOpback to summary
protected static void interpretIntOp(AluInstr instr, Operation op, long[] fixnums, boolean[] booleans)
processBookKeepingOpback to summary
protected static void processBookKeepingOp(ThreadContext context, Block block, Instr instr, Operation operation, String name, IRubyObject[] args, IRubyObject self, Block blockArg, RubyModule implClass, DynamicScope currDynScope, Object[] temp, StaticScope currScope)
processCallback to summary
protected static void processCall(ThreadContext context, Instr instr, Operation operation, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject self, String name)
processOtherOpback to summary
protected static void processOtherOp(ThreadContext context, Block block, Instr instr, Operation operation, DynamicScope currDynScope, StaticScope currScope, Object[] temp, IRubyObject self, double[] floats, long[] fixnums, boolean[] booleans)
processReturnOpback to summary
protected static IRubyObject processReturnOp(ThreadContext context, Block block, Instr instr, Operation operation, DynamicScope currDynScope, Object[] temp, IRubyObject self, StaticScope currScope)
receiveArgback to summary
protected static void receiveArg(ThreadContext context, Instr i, Operation operation, IRubyObject self, IRubyObject[] args, boolean ruby2Keywords, StaticScope currScope, DynamicScope currDynScope, Object[] temp, Object exception, Block blockArg)
retrieveOpback to summary
protected static Object retrieveOp(Operand r, ThreadContext context, IRubyObject self, DynamicScope currDynScope, StaticScope currScope, Object[] temp)
setBooleanVarback to summary
private static void setBooleanVar(boolean[] booleans, TemporaryLocalVariable var, boolean val)
setFixnumVarback to summary
private static void setFixnumVar(long[] fixnums, TemporaryLocalVariable var, long val)
setFloatVarback to summary
private static void setFloatVar(double[] floats, TemporaryLocalVariable var, double val)
setResultback to summary
protected static void setResult(Object[] temp, DynamicScope currDynScope, Variable resultVar, Object result)
setResultback to summary
protected static void setResult(Object[] temp, DynamicScope currDynScope, Instr instr, Object result)