org.jruby.javasupport.util
Class CompilerHelpers

java.lang.Object
  extended by org.jruby.javasupport.util.CompilerHelpers

public class CompilerHelpers
extends java.lang.Object

Helper methods which are called by the compiler. Note: These will show no consumers, but generated code does call these so don't remove them thinking they are dead code.


Constructor Summary
CompilerHelpers()
           
 
Method Summary
static CompiledBlock createBlock(ThreadContext context, IRubyObject self, int arity, java.lang.String[] staticScopeNames, CompiledBlockCallback callback)
           
static IRubyObject def(ThreadContext context, Visibility visibility, IRubyObject self, java.lang.Class compiledClass, java.lang.String name, java.lang.String javaName, java.lang.String[] scopeNames, int arity)
           
static IRubyObject doAttrAssign(IRubyObject receiver, IRubyObject[] args, ThreadContext context, java.lang.String name, IRubyObject caller, CallType callType, Block block)
           
static IRubyObject doAttrAssignIndexed(IRubyObject receiver, IRubyObject[] args, ThreadContext context, byte methodIndex, java.lang.String name, IRubyObject caller, CallType callType, Block block)
           
static IRubyObject doInvokeDynamic(IRubyObject receiver, IRubyObject[] args, ThreadContext context, java.lang.String name, IRubyObject caller, CallType callType, Block block)
           
static IRubyObject doInvokeDynamicIndexed(IRubyObject receiver, IRubyObject[] args, ThreadContext context, byte methodIndex, java.lang.String name, IRubyObject caller, CallType callType, Block block)
           
static RubyArray ensureRubyArray(IRubyObject value)
           
static IRubyObject fetchClassVariable(ThreadContext context, Ruby runtime, IRubyObject self, java.lang.String name)
           
static IRubyObject handleJumpException(JumpException je, Block block)
           
static IRubyObject nullToNil(IRubyObject value, Ruby runtime)
           
static RubyModule prepareClassNamespace(ThreadContext context, IRubyObject rubyModule)
           
static RubyClass prepareSuperClass(Ruby runtime, IRubyObject rubyClass)
           
static void raiseArgumentError(Ruby runtime, int given, int maximum)
           
static Pattern regexpLiteral(Ruby runtime, java.lang.String ptr, int options)
           
static int regexpLiteralFlags(int options)
           
static IRubyObject setClassVariable(ThreadContext context, Ruby runtime, IRubyObject self, java.lang.String name, IRubyObject value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompilerHelpers

public CompilerHelpers()
Method Detail

createBlock

public static CompiledBlock createBlock(ThreadContext context,
                                        IRubyObject self,
                                        int arity,
                                        java.lang.String[] staticScopeNames,
                                        CompiledBlockCallback callback)

def

public static IRubyObject def(ThreadContext context,
                              Visibility visibility,
                              IRubyObject self,
                              java.lang.Class compiledClass,
                              java.lang.String name,
                              java.lang.String javaName,
                              java.lang.String[] scopeNames,
                              int arity)

doAttrAssign

public static IRubyObject doAttrAssign(IRubyObject receiver,
                                       IRubyObject[] args,
                                       ThreadContext context,
                                       java.lang.String name,
                                       IRubyObject caller,
                                       CallType callType,
                                       Block block)

doAttrAssignIndexed

public static IRubyObject doAttrAssignIndexed(IRubyObject receiver,
                                              IRubyObject[] args,
                                              ThreadContext context,
                                              byte methodIndex,
                                              java.lang.String name,
                                              IRubyObject caller,
                                              CallType callType,
                                              Block block)

doInvokeDynamic

public static IRubyObject doInvokeDynamic(IRubyObject receiver,
                                          IRubyObject[] args,
                                          ThreadContext context,
                                          java.lang.String name,
                                          IRubyObject caller,
                                          CallType callType,
                                          Block block)

doInvokeDynamicIndexed

public static IRubyObject doInvokeDynamicIndexed(IRubyObject receiver,
                                                 IRubyObject[] args,
                                                 ThreadContext context,
                                                 byte methodIndex,
                                                 java.lang.String name,
                                                 IRubyObject caller,
                                                 CallType callType,
                                                 Block block)

ensureRubyArray

public static RubyArray ensureRubyArray(IRubyObject value)

fetchClassVariable

public static IRubyObject fetchClassVariable(ThreadContext context,
                                             Ruby runtime,
                                             IRubyObject self,
                                             java.lang.String name)

handleJumpException

public static IRubyObject handleJumpException(JumpException je,
                                              Block block)

nullToNil

public static IRubyObject nullToNil(IRubyObject value,
                                    Ruby runtime)

prepareSuperClass

public static RubyClass prepareSuperClass(Ruby runtime,
                                          IRubyObject rubyClass)

prepareClassNamespace

public static RubyModule prepareClassNamespace(ThreadContext context,
                                               IRubyObject rubyModule)

regexpLiteralFlags

public static int regexpLiteralFlags(int options)

regexpLiteral

public static Pattern regexpLiteral(Ruby runtime,
                                    java.lang.String ptr,
                                    int options)

setClassVariable

public static IRubyObject setClassVariable(ThreadContext context,
                                           Ruby runtime,
                                           IRubyObject self,
                                           java.lang.String name,
                                           IRubyObject value)

raiseArgumentError

public static void raiseArgumentError(Ruby runtime,
                                      int given,
                                      int maximum)


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