Package org.jruby.ir.interpreter
Class Interpreter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidprivate static IRubyObjectevalCommon(ThreadContext context, DynamicScope evalScope, IRubyObject self, IRubyObject src, String file, int lineNumber, String name, Block blockArg, EvalType evalType) static IRubyObjectevalSimple(ThreadContext context, RubyModule under, IRubyObject self, RubyString src, String file, int lineNumber, EvalType evalType) Evaluate the given string.static IRubyObjectevalWithBinding(ThreadContext context, IRubyObject self, IRubyObject src, Binding binding) Evaluate the given string under the specified binding object.protected IRubyObjectexecute(Ruby runtime, IRScriptBody irScope, IRubyObject self) static IRubyObjectINTERPRET_BLOCK(ThreadContext context, Block block, IRubyObject self, InterpreterContext ic, IRubyObject[] args, String name, Block blockArg) static IRubyObjectINTERPRET_EVAL(ThreadContext context, IRubyObject self, InterpreterContext ic, RubyModule clazz, IRubyObject[] args, String name, Block blockArg) static IRubyObjectINTERPRET_ROOT(ThreadContext context, IRubyObject self, InterpreterContext ic, RubyModule clazz, String name) private static InterpreterContextprepareIC(ThreadContext context, DynamicScope evalScope, IRubyObject src, String file, int lineNumber, EvalType evalType) Methods inherited from class org.jruby.ir.IRTranslator
execute
-
Field Details
-
LOG
-
ROOT
- See Also:
-
interpInstrsCount
static int interpInstrsCount
-
-
Constructor Details
-
Interpreter
public Interpreter()
-
-
Method Details
-
dumpStats
public static void dumpStats() -
execute
- Specified by:
executein classIRTranslator<IRubyObject,IRubyObject>
-
INTERPRET_ROOT
public static IRubyObject INTERPRET_ROOT(ThreadContext context, IRubyObject self, InterpreterContext ic, RubyModule clazz, String name) -
INTERPRET_EVAL
public static IRubyObject INTERPRET_EVAL(ThreadContext context, IRubyObject self, InterpreterContext ic, RubyModule clazz, IRubyObject[] args, String name, Block blockArg) -
INTERPRET_BLOCK
public static IRubyObject INTERPRET_BLOCK(ThreadContext context, Block block, IRubyObject self, InterpreterContext ic, IRubyObject[] args, String name, Block blockArg) -
evalSimple
public static IRubyObject evalSimple(ThreadContext context, RubyModule under, IRubyObject self, RubyString src, String file, int lineNumber, EvalType evalType) Evaluate the given string.- Parameters:
context- the current thread's contextself- the self to evaluate undersrc- The string containing the text to be evaluatedfile- The filename to use when reporting errors during the evaluationlineNumber- that the eval supposedly starts from- Returns:
- An IRubyObject result from the evaluation
-
evalCommon
private static IRubyObject evalCommon(ThreadContext context, DynamicScope evalScope, IRubyObject self, IRubyObject src, String file, int lineNumber, String name, Block blockArg, EvalType evalType) -
evalWithBinding
public static IRubyObject evalWithBinding(ThreadContext context, IRubyObject self, IRubyObject src, Binding binding) Evaluate the given string under the specified binding object. If the binding is not a Proc or Binding object (RubyProc or RubyBinding) throw an appropriate type error.- Parameters:
context- the thread context for the current threadself- the self against which eval was called; used as self in the eval in 1.9 modesrc- The string containing the text to be evaluatedbinding- The binding object under which to perform the evaluation- Returns:
- An IRubyObject result from the evaluation
-
prepareIC
private static InterpreterContext prepareIC(ThreadContext context, DynamicScope evalScope, IRubyObject src, String file, int lineNumber, EvalType evalType)
-