public class Interpreter extends IRTranslator<IRubyObject,IRubyObject>
| Modifier and Type | Field and Description |
|---|---|
static Logger |
LOG |
static java.lang.String |
ROOT |
| Constructor and Description |
|---|
Interpreter() |
| Modifier and Type | Method and Description |
|---|---|
static void |
dumpStats() |
static IRubyObject |
evalSimple(ThreadContext context,
RubyModule under,
IRubyObject self,
RubyString src,
java.lang.String file,
int lineNumber,
EvalType evalType)
Evaluate the given string.
|
static IRubyObject |
evalWithBinding(ThreadContext context,
IRubyObject self,
IRubyObject src,
Binding binding)
Evaluate the given string under the specified binding object.
|
protected IRubyObject |
execute(Ruby runtime,
IRScriptBody irScope,
IRubyObject self) |
static IRubyObject |
INTERPRET_BLOCK(ThreadContext context,
Block block,
IRubyObject self,
InterpreterContext ic,
IRubyObject[] args,
java.lang.String name,
Block blockArg) |
static IRubyObject |
INTERPRET_EVAL(ThreadContext context,
IRubyObject self,
InterpreterContext ic,
RubyModule clazz,
IRubyObject[] args,
java.lang.String name,
Block blockArg) |
static IRubyObject |
INTERPRET_ROOT(ThreadContext context,
IRubyObject self,
InterpreterContext ic,
RubyModule clazz,
java.lang.String name) |
executepublic static final Logger LOG
public static final java.lang.String ROOT
public static void dumpStats()
protected IRubyObject execute(Ruby runtime, IRScriptBody irScope, IRubyObject self)
execute in class IRTranslator<IRubyObject,IRubyObject>public static IRubyObject INTERPRET_ROOT(ThreadContext context, IRubyObject self, InterpreterContext ic, RubyModule clazz, java.lang.String name)
public static IRubyObject INTERPRET_EVAL(ThreadContext context, IRubyObject self, InterpreterContext ic, RubyModule clazz, IRubyObject[] args, java.lang.String name, Block blockArg)
public static IRubyObject INTERPRET_BLOCK(ThreadContext context, Block block, IRubyObject self, InterpreterContext ic, IRubyObject[] args, java.lang.String name, Block blockArg)
public static IRubyObject evalSimple(ThreadContext context, RubyModule under, IRubyObject self, RubyString src, java.lang.String file, int lineNumber, EvalType evalType)
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 frompublic static IRubyObject evalWithBinding(ThreadContext context, IRubyObject self, IRubyObject src, Binding binding)
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 evaluationCopyright © 2001-2019 JRuby. All Rights Reserved.