org.jruby.evaluator
Class ASTInterpreter

java.lang.Object
  extended by org.jruby.evaluator.ASTInterpreter

public class ASTInterpreter
extends java.lang.Object


Constructor Summary
ASTInterpreter()
           
 
Method Summary
static void callTraceFunction(Ruby runtime, ThreadContext context, RubyEvent event)
           
static IRubyObject evalClassDefinitionBody(Ruby runtime, ThreadContext context, StaticScope scope, Node bodyNode, RubyModule type, IRubyObject self, Block block)
          Evaluates the body in a class or module definition statement.
static IRubyObject evalSimple(ThreadContext context, IRubyObject self, RubyString src, java.lang.String file, int lineNumber)
          Evaluate the given string.
static IRubyObject evalWithBinding(ThreadContext context, IRubyObject src, Binding binding)
          Deprecated. 
static IRubyObject evalWithBinding(ThreadContext context, IRubyObject self, IRubyObject src, Binding binding)
          Evaluate the given string under the specified binding object.
static org.jruby.util.ByteList getArgumentDefinition(Ruby runtime, ThreadContext context, Node node, org.jruby.util.ByteList type, IRubyObject self, Block block)
           
static Block getBlock(Ruby runtime, ThreadContext context, IRubyObject self, Block currentBlock, Node blockNode)
           
static RubyModule getClassVariableBase(ThreadContext context, Ruby runtime)
           
static IRubyObject INTERPRET_BLOCK(Ruby runtime, ThreadContext context, java.lang.String file, int line, Node node, java.lang.String name, IRubyObject self, Block block)
           
static IRubyObject INTERPRET_CLASS(Ruby runtime, ThreadContext context, Node node, java.lang.String name, IRubyObject self, Block block)
           
static IRubyObject INTERPRET_EVAL(Ruby runtime, ThreadContext context, Node node, java.lang.String name, IRubyObject self, Block block)
           
static IRubyObject INTERPRET_EVAL(Ruby runtime, ThreadContext context, java.lang.String file, int line, Node node, java.lang.String name, IRubyObject self, Block block)
           
static IRubyObject INTERPRET_METHOD(Ruby runtime, ThreadContext context, java.lang.String file, int line, RubyModule implClass, Node node, java.lang.String name, IRubyObject self, Block block, boolean isTraceable)
           
static IRubyObject INTERPRET_ROOT(Ruby runtime, ThreadContext context, Node node, IRubyObject self, Block block)
           
static IRubyObject multipleAsgnArrayNode(Ruby runtime, ThreadContext context, MultipleAsgnNode iVisited, ArrayNode node, IRubyObject self, Block aBlock)
           
static IRubyObject pollAndReturn(ThreadContext context, IRubyObject result)
           
static IRubyObject[] setupArgs(Ruby runtime, ThreadContext context, Node node, IRubyObject self, Block aBlock)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ASTInterpreter

public ASTInterpreter()
Method Detail

INTERPRET_METHOD

public static IRubyObject INTERPRET_METHOD(Ruby runtime,
                                           ThreadContext context,
                                           java.lang.String file,
                                           int line,
                                           RubyModule implClass,
                                           Node node,
                                           java.lang.String name,
                                           IRubyObject self,
                                           Block block,
                                           boolean isTraceable)

INTERPRET_EVAL

public static IRubyObject INTERPRET_EVAL(Ruby runtime,
                                         ThreadContext context,
                                         Node node,
                                         java.lang.String name,
                                         IRubyObject self,
                                         Block block)

INTERPRET_EVAL

public static IRubyObject INTERPRET_EVAL(Ruby runtime,
                                         ThreadContext context,
                                         java.lang.String file,
                                         int line,
                                         Node node,
                                         java.lang.String name,
                                         IRubyObject self,
                                         Block block)

INTERPRET_CLASS

public static IRubyObject INTERPRET_CLASS(Ruby runtime,
                                          ThreadContext context,
                                          Node node,
                                          java.lang.String name,
                                          IRubyObject self,
                                          Block block)

INTERPRET_BLOCK

public static IRubyObject INTERPRET_BLOCK(Ruby runtime,
                                          ThreadContext context,
                                          java.lang.String file,
                                          int line,
                                          Node node,
                                          java.lang.String name,
                                          IRubyObject self,
                                          Block block)

INTERPRET_ROOT

public static IRubyObject INTERPRET_ROOT(Ruby runtime,
                                         ThreadContext context,
                                         Node node,
                                         IRubyObject self,
                                         Block block)

evalWithBinding

@Deprecated
public static IRubyObject evalWithBinding(ThreadContext context,
                                                     IRubyObject src,
                                                     Binding binding)
Deprecated. 


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 thread
self - the self against which eval was called; used as self in the eval in 1.9 mode
src - The string containing the text to be evaluated
binding - The binding object under which to perform the evaluation
Returns:
An IRubyObject result from the evaluation

evalSimple

public static IRubyObject evalSimple(ThreadContext context,
                                     IRubyObject self,
                                     RubyString src,
                                     java.lang.String file,
                                     int lineNumber)
Evaluate the given string.

Parameters:
context - TODO
evalString - The string containing the text to be evaluated
file - The filename to use when reporting errors during the evaluation
lineNumber - that the eval supposedly starts from
Returns:
An IRubyObject result from the evaluation

callTraceFunction

public static void callTraceFunction(Ruby runtime,
                                     ThreadContext context,
                                     RubyEvent event)

pollAndReturn

public static IRubyObject pollAndReturn(ThreadContext context,
                                        IRubyObject result)

multipleAsgnArrayNode

public static IRubyObject multipleAsgnArrayNode(Ruby runtime,
                                                ThreadContext context,
                                                MultipleAsgnNode iVisited,
                                                ArrayNode node,
                                                IRubyObject self,
                                                Block aBlock)

evalClassDefinitionBody

public static IRubyObject evalClassDefinitionBody(Ruby runtime,
                                                  ThreadContext context,
                                                  StaticScope scope,
                                                  Node bodyNode,
                                                  RubyModule type,
                                                  IRubyObject self,
                                                  Block block)
Evaluates the body in a class or module definition statement.


getArgumentDefinition

public static org.jruby.util.ByteList getArgumentDefinition(Ruby runtime,
                                                            ThreadContext context,
                                                            Node node,
                                                            org.jruby.util.ByteList type,
                                                            IRubyObject self,
                                                            Block block)

getBlock

public static Block getBlock(Ruby runtime,
                             ThreadContext context,
                             IRubyObject self,
                             Block currentBlock,
                             Node blockNode)

getClassVariableBase

public static RubyModule getClassVariableBase(ThreadContext context,
                                              Ruby runtime)

setupArgs

public static IRubyObject[] setupArgs(Ruby runtime,
                                      ThreadContext context,
                                      Node node,
                                      IRubyObject self,
                                      Block aBlock)


Copyright © 2002-2009 JRuby Team. All Rights Reserved.