Package org.jruby.ir.interpreter
Class Interpreter
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidstatic Stringstatic 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, boolean bindingGiven) Evaluate the given string under the specified binding object.protected IRubyObjectexecute(ThreadContext context, IRScriptBody irScope, IRubyObject self) static IRubyObjectINTERPRET_BLOCK(ThreadContext context, Block block, IRubyObject self, InterpreterContext ic, IRubyObject[] args, String name, Block blockArg) static IRubyObjectINTERPRET_CLASS(ThreadContext context, IRScope body, RubyModule clazz, String name) static IRubyObjectINTERPRET_EVAL(ThreadContext context, IRubyObject self, InterpreterContext ic, RubyModule clazz, IRubyObject[] args, String name, Block blockArg) static IRubyObjectINTERPRET_METACLASS(ThreadContext context, IRScope body, RubyModule clazz, String name, Visibility visibility) static IRubyObjectINTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, Block block) static IRubyObjectINTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, IRubyObject[] args, Block block) static IRubyObjectINTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, IRubyObject arg0, Block block) static IRubyObjectINTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, Block block) static IRubyObjectINTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) static IRubyObjectINTERPRET_MODULE(ThreadContext context, IRScope body, RubyModule clazz, String name) static IRubyObjectINTERPRET_ROOT(ThreadContext context, IRubyObject self, InterpreterContext ic, RubyModule clazz, String name) static voidpostFrameScope(InterpreterContext ic, ThreadContext context) static voidpreFrameScope(InterpreterContext ic, ThreadContext context, IRubyObject self, String name, Block block, RubyModule implClass, DynamicScope parentScope, Visibility visibility) Methods inherited from class org.jruby.ir.IRTranslator
execute
-
Field Details
-
LOG
-
ROOT
- See Also:
-
-
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) -
INTERPRET_CLASS
public static IRubyObject INTERPRET_CLASS(ThreadContext context, IRScope body, RubyModule clazz, String name) -
INTERPRET_MODULE
public static IRubyObject INTERPRET_MODULE(ThreadContext context, IRScope body, RubyModule clazz, String name) -
INTERPRET_METACLASS
public static IRubyObject INTERPRET_METACLASS(ThreadContext context, IRScope body, RubyModule clazz, String name, Visibility visibility) -
INTERPRET_METHOD
public static IRubyObject INTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, IRubyObject[] args, Block block) -
INTERPRET_METHOD
public static IRubyObject INTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, Block block) -
INTERPRET_METHOD
public static IRubyObject INTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, IRubyObject arg0, Block block) -
INTERPRET_METHOD
public static IRubyObject INTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, Block block) -
INTERPRET_METHOD
public static IRubyObject INTERPRET_METHOD(ThreadContext context, IRScope body, RubyModule implClass, IRubyObject self, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block) -
postFrameScope
-
preFrameScope
public static void preFrameScope(InterpreterContext ic, ThreadContext context, IRubyObject self, String name, Block block, RubyModule implClass, DynamicScope parentScope, Visibility visibility) -
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
-
evalName
-
evalWithBinding
public static IRubyObject evalWithBinding(ThreadContext context, IRubyObject self, IRubyObject src, Binding binding, boolean bindingGiven) 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
-