org.jruby.javasupport.util
Class RuntimeHelpers

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

public class RuntimeHelpers
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.


Field Summary
static int MAX_SPECIFIC_ARITY_HASH
           
static int MAX_SPECIFIC_ARITY_OBJECT_ARRAY
           
 
Constructor Summary
RuntimeHelpers()
           
 
Method Summary
static void addInstanceMethod(RubyModule containingClass, java.lang.String name, DynamicMethod method, Visibility visibility, ThreadContext context, Ruby runtime)
           
static IRubyObject[] appendToObjectArray(IRubyObject[] array, IRubyObject add)
           
static boolean areAnyTrueForCaselessWhen(IRubyObject[] receivers)
           
static RubyArray argsCat(IRubyObject first, IRubyObject second)
           
static RubyArray argsPush(RubyArray first, IRubyObject second)
           
static IRubyObject arrayEntryOrNil(RubyArray array, int index)
           
static IRubyObject arrayEntryOrNilOne(RubyArray array)
           
static IRubyObject arrayEntryOrNilTwo(RubyArray array)
           
static IRubyObject arrayEntryOrNilZero(RubyArray array)
           
static IRubyObject arrayPostOrNil(RubyArray array, int pre, int post, int index)
           
static IRubyObject arrayPostOrNilOne(RubyArray array, int pre, int post)
           
static IRubyObject arrayPostOrNilTwo(RubyArray array, int pre, int post)
           
static IRubyObject arrayPostOrNilZero(RubyArray array, int pre, int post)
           
static IRubyObject arraySlice1(IRubyObject arrayish)
           
static IRubyObject[] arraySlice1N(IRubyObject arrayish)
           
static RubyArray arrayValue(IRubyObject value)
           
static RubyArray arrayValue(ThreadContext context, Ruby runtime, IRubyObject value)
           
static IRubyObject aryToAry(IRubyObject value)
           
static IRubyObject aValueSplat(IRubyObject value)
           
static IRubyObject aValueSplat19(IRubyObject value)
           
static IRubyObject backref(ThreadContext context)
           
static IRubyObject backrefLastMatch(ThreadContext context)
           
static IRubyObject backrefMatchLast(ThreadContext context)
           
static IRubyObject backrefMatchPost(ThreadContext context)
           
static IRubyObject backrefMatchPre(ThreadContext context)
           
static IRubyObject breakJump(ThreadContext context, IRubyObject value)
           
static IRubyObject breakJumpInWhile(JumpException.BreakJump bj, ThreadContext context)
           
static IRubyObject breakLocalJumpError(Ruby runtime, IRubyObject value)
           
static java.lang.String buildBlockDescriptor(java.lang.String closureMethod, int arity, StaticScope scope, java.lang.String file, int line, boolean hasMultipleArgsHead, NodeType argsNodeId, ASTInspector inspector)
           
static java.lang.String buildBlockDescriptor19(java.lang.String closureMethod, int arity, StaticScope scope, java.lang.String file, int line, boolean hasMultipleArgsHead, NodeType argsNodeId, java.lang.String parameterList, ASTInspector inspector)
           
static IRubyObject callMethodMissing(ThreadContext context, IRubyObject receiver, Visibility visibility, java.lang.String name, CallType callType, Block block)
           
static IRubyObject callMethodMissing(ThreadContext context, IRubyObject receiver, Visibility visibility, java.lang.String name, CallType callType, IRubyObject[] args, Block block)
           
static IRubyObject callMethodMissing(ThreadContext context, IRubyObject receiver, Visibility visibility, java.lang.String name, CallType callType, IRubyObject arg0, Block block)
           
static IRubyObject callMethodMissing(ThreadContext context, IRubyObject receiver, Visibility visibility, java.lang.String name, CallType callType, IRubyObject arg0, IRubyObject arg1, Block block)
           
static IRubyObject callMethodMissing(ThreadContext context, IRubyObject receiver, Visibility visibility, java.lang.String name, CallType callType, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
           
static IRubyObject callZSuper(Ruby runtime, ThreadContext context, Block block, IRubyObject self)
           
static void checkArgumentCount(ThreadContext context, int length, int min, int max)
           
static void checkArgumentCount(ThreadContext context, IRubyObject[] args, int req)
          Used by the compiler to simplify arg checking in variable-arity paths
static void checkArgumentCount(ThreadContext context, IRubyObject[] args, int min, int max)
          Used by the compiler to simplify arg checking in variable-arity paths
static RubyModule checkIsModule(IRubyObject maybeModule)
           
static void checkSuperDisabledOrOutOfMethod(ThreadContext context)
           
static void clearErrorInfo(ThreadContext context)
           
static IRubyObject[] concatObjectArrays(IRubyObject[] array, IRubyObject[] add)
           
static RubyHash constructHash(Ruby runtime, IRubyObject key1, IRubyObject value1)
           
static RubyHash constructHash(Ruby runtime, IRubyObject key1, IRubyObject value1, IRubyObject key2, IRubyObject value2)
           
static RubyHash constructHash(Ruby runtime, IRubyObject key1, IRubyObject value1, IRubyObject key2, IRubyObject value2, IRubyObject key3, IRubyObject value3)
           
static RubyHash constructHash19(Ruby runtime, IRubyObject key1, IRubyObject value1)
           
static RubyHash constructHash19(Ruby runtime, IRubyObject key1, IRubyObject value1, IRubyObject key2, IRubyObject value2)
           
static RubyHash constructHash19(Ruby runtime, IRubyObject key1, IRubyObject value1, IRubyObject key2, IRubyObject value2, IRubyObject key3, IRubyObject value3)
           
static IRubyObject[] constructObjectArray(IRubyObject one)
           
static IRubyObject[] constructObjectArray(IRubyObject one, IRubyObject two)
           
static IRubyObject[] constructObjectArray(IRubyObject one, IRubyObject two, IRubyObject three)
           
static IRubyObject[] constructObjectArray(IRubyObject one, IRubyObject two, IRubyObject three, IRubyObject four)
           
static IRubyObject[] constructObjectArray(IRubyObject one, IRubyObject two, IRubyObject three, IRubyObject four, IRubyObject five)
           
static RubyArray constructRubyArray(Ruby runtime, IRubyObject one)
           
static RubyArray constructRubyArray(Ruby runtime, IRubyObject one, IRubyObject two)
           
static RubyArray constructRubyArray(Ruby runtime, IRubyObject one, IRubyObject two, IRubyObject three)
           
static RubyArray constructRubyArray(Ruby runtime, IRubyObject one, IRubyObject two, IRubyObject three, IRubyObject four)
           
static RubyArray constructRubyArray(Ruby runtime, IRubyObject one, IRubyObject two, IRubyObject three, IRubyObject four, IRubyObject five)
           
static java.lang.String[] constructStringArray(java.lang.String one)
           
static java.lang.String[] constructStringArray(java.lang.String one, java.lang.String two)
           
static java.lang.String[] constructStringArray(java.lang.String one, java.lang.String two, java.lang.String three)
           
static java.lang.String[] constructStringArray(java.lang.String one, java.lang.String two, java.lang.String three, java.lang.String four)
           
static java.lang.String[] constructStringArray(java.lang.String one, java.lang.String two, java.lang.String three, java.lang.String four, java.lang.String five)
           
static java.lang.String[] constructStringArray(java.lang.String one, java.lang.String two, java.lang.String three, java.lang.String four, java.lang.String five, java.lang.String six)
           
static java.lang.String[] constructStringArray(java.lang.String one, java.lang.String two, java.lang.String three, java.lang.String four, java.lang.String five, java.lang.String six, java.lang.String seven)
           
static java.lang.String[] constructStringArray(java.lang.String one, java.lang.String two, java.lang.String three, java.lang.String four, java.lang.String five, java.lang.String six, java.lang.String seven, java.lang.String eight)
           
static java.lang.String[] constructStringArray(java.lang.String one, java.lang.String two, java.lang.String three, java.lang.String four, java.lang.String five, java.lang.String six, java.lang.String seven, java.lang.String eight, java.lang.String nine)
           
static java.lang.String[] constructStringArray(java.lang.String one, java.lang.String two, java.lang.String three, java.lang.String four, java.lang.String five, java.lang.String six, java.lang.String seven, java.lang.String eight, java.lang.String nine, java.lang.String ten)
           
static Block createBlock(ThreadContext context, IRubyObject self, BlockBody body)
           
static Block createBlock19(ThreadContext context, IRubyObject self, BlockBody body)
           
static CompiledBlockCallback createBlockCallback(Ruby runtime, java.lang.Object scriptObject, java.lang.String closureMethod, java.lang.String file, int line)
           
static CompiledBlockCallback19 createBlockCallback19(Ruby runtime, java.lang.Object scriptObject, java.lang.String closureMethod, java.lang.String file, int line)
           
static byte[] createBlockCallback19Offline(java.lang.String classPath, java.lang.String closureMethod, java.lang.String file, int line)
           
static byte[] createBlockCallbackOffline(java.lang.String classPath, java.lang.String closureMethod, java.lang.String file, int line)
           
static BlockBody createCompiledBlockBody(ThreadContext context, java.lang.Object scriptObject, java.lang.String descriptor)
           
static BlockBody createCompiledBlockBody(ThreadContext context, java.lang.Object scriptObject, java.lang.String closureMethod, int arity, java.lang.String[] staticScopeNames, boolean hasMultipleArgsHead, int argsNodeType, java.lang.String file, int line, boolean light)
           
static BlockBody createCompiledBlockBody19(ThreadContext context, java.lang.Object scriptObject, java.lang.String descriptor)
           
static BlockBody createCompiledBlockBody19(ThreadContext context, java.lang.Object scriptObject, java.lang.String closureMethod, int arity, java.lang.String[] staticScopeNames, boolean hasMultipleArgsHead, int argsNodeType, java.lang.String file, int line, boolean light, java.lang.String parameterList)
           
static Block createSharedScopeBlock(ThreadContext context, IRubyObject self, int arity, CompiledBlockCallback callback, boolean hasMultipleArgsHead, int argsNodeType)
           
static RubyArray createSubarray(IRubyObject[] input, Ruby runtime, int start)
           
static RubyArray createSubarray(IRubyObject[] input, Ruby runtime, int start, int exclude)
           
static RubyArray createSubarray(RubyArray input, int start)
           
static RubyArray createSubarray(RubyArray input, int start, int post)
           
static IRubyObject declareClassVariable(ThreadContext context, Ruby runtime, IRubyObject self, java.lang.String name, IRubyObject value)
           
static BlockStaticScope decodeBlockScope(ThreadContext context, java.lang.String scopeString)
           
static int[] decodeCaptureOffsets(java.lang.String encoded)
           
static LocalStaticScope decodeLocalScope(ThreadContext context, java.lang.String scopeString)
           
static LocalStaticScope decodeRootScope(ThreadContext context, java.lang.String scopeString)
           
static IRubyObject def(ThreadContext context, IRubyObject self, java.lang.Object scriptObject, java.lang.String name, java.lang.String javaName, java.lang.String scopeString, int arity, java.lang.String filename, int line, CallConfiguration callConfig, java.lang.String parameterDesc)
           
static IRubyObject defineAlias(ThreadContext context, IRubyObject self, java.lang.Object newNameArg, java.lang.Object oldNameArg)
           
static byte[] defOffline(java.lang.String name, java.lang.String classPath, java.lang.String invokerName, Arity arity, StaticScope scope, CallConfiguration callConfig, java.lang.String filename, int line)
           
static IRubyObject defs(ThreadContext context, IRubyObject self, IRubyObject receiver, java.lang.Object scriptObject, java.lang.String name, java.lang.String javaName, java.lang.String scopeString, int arity, java.lang.String filename, int line, CallConfiguration callConfig, java.lang.String parameterDesc)
           
static IRubyObject doAttrAsgn(IRubyObject receiver, CallSite callSite, IRubyObject[] args, IRubyObject value, ThreadContext context, IRubyObject caller)
           
static IRubyObject doAttrAsgn(IRubyObject receiver, CallSite callSite, IRubyObject[] args, ThreadContext context, IRubyObject caller)
           
static IRubyObject doAttrAsgn(IRubyObject receiver, CallSite callSite, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, IRubyObject value, ThreadContext context, IRubyObject caller)
           
static IRubyObject doAttrAsgn(IRubyObject receiver, CallSite callSite, IRubyObject arg0, IRubyObject arg1, IRubyObject value, ThreadContext context, IRubyObject caller)
           
static IRubyObject doAttrAsgn(IRubyObject receiver, CallSite callSite, IRubyObject arg0, IRubyObject value, ThreadContext context, IRubyObject caller)
           
static IRubyObject doAttrAsgn(IRubyObject receiver, CallSite callSite, IRubyObject value, ThreadContext context, IRubyObject caller)
           
static IRubyObject elementOrNil(IRubyObject[] input, int element, IRubyObject nil)
           
static IRubyObject elementOrNull(IRubyObject[] input, int element)
           
static java.lang.String encodeCaptureOffsets(int[] scopeOffsets)
           
static java.lang.String encodeParameterList(ArgsNode argsNode)
           
static java.lang.String encodeScope(StaticScope scope)
           
static RubyArray ensureMultipleAssignableRubyArray(IRubyObject value, Ruby runtime, boolean masgnHasHead)
           
static RubyArray ensureRubyArray(IRubyObject value)
           
static RubyArray ensureRubyArray(Ruby runtime, IRubyObject value)
           
static Block ensureSuperBlock(Block given, Block parent)
           
static IRubyObject fastDeclareClassVariable(ThreadContext context, Ruby runtime, IRubyObject self, java.lang.String internedName, IRubyObject value)
           
static IRubyObject fastFetchClassVariable(ThreadContext context, Ruby runtime, IRubyObject self, java.lang.String internedName)
           
static IRubyObject fastSetClassVariable(ThreadContext context, Ruby runtime, IRubyObject self, java.lang.String internedName, IRubyObject value)
           
static IRubyObject fetchClassVariable(ThreadContext context, Ruby runtime, IRubyObject self, java.lang.String name)
           
static void fillNil(IRubyObject[] arr, int from, int to, Ruby runtime)
           
static void fillNil(IRubyObject[] arr, Ruby runtime)
           
static RubyModule findImplementerIfNecessary(RubyModule clazz, RubyModule implementationClass)
           
static IRubyObject[] getArgValues(ThreadContext context)
           
static IRubyObject getBackref(Ruby runtime, ThreadContext context)
           
static Block getBlock(Ruby runtime, ThreadContext context, IRubyObject self, Node node, Block aBlock)
           
static Block getBlock(ThreadContext context, IRubyObject self, Node node)
           
static Block getBlockFromBlockPassBody(IRubyObject proc, Block currentBlock)
           
static Block getBlockFromBlockPassBody(Ruby runtime, IRubyObject proc, Block currentBlock)
           
static IRubyObject getConstant(ThreadContext context, java.lang.String internedName)
           
static org.jruby.util.ByteList getDefinedCall(ThreadContext context, IRubyObject self, IRubyObject receiver, java.lang.String name)
           
static org.jruby.util.ByteList getDefinedConstantOrBoundMethod(IRubyObject left, java.lang.String name)
           
static org.jruby.util.ByteList getDefinedNot(Ruby runtime, org.jruby.util.ByteList definition)
           
static IRubyObject getErrorInfo(Ruby runtime)
           
static int getFastSwitchSingleCharString(IRubyObject str)
           
static int getFastSwitchSingleCharSymbol(IRubyObject sym)
           
static int getFastSwitchString(IRubyObject str)
           
static int getFastSwitchSymbol(IRubyObject sym)
           
static IRubyObject getGlobalVariable(Ruby runtime, java.lang.String name)
           
static IRubyObject getInstanceVariable(IRubyObject self, Ruby runtime, java.lang.String internedName)
           
static IRubyObject getLastLine(Ruby runtime, ThreadContext context)
           
static java.lang.String getLocalJumpTypeOrRethrow(RaiseException re)
           
static java.lang.String[] getScopeNames(java.lang.String scopeNames)
           
static RubyClass getSingletonClass(Ruby runtime, IRubyObject receiver)
           
static RubyModule getSuperClassForDefined(Ruby runtime, RubyModule klazz)
           
static void handleArgumentSizes(ThreadContext context, Ruby runtime, int given, int required, int opt, int rest)
           
static java.lang.String interpretAliasUndefName(Node nameNode, Ruby runtime, ThreadContext context, IRubyObject self, Block aBlock)
          Some of this code looks scary.
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, Block block)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, CallType callType)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject... args)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject arg0)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject[] args, Block block)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject[] args, CallType callType, Block block)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject arg0, Block block)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject arg, CallType callType, Block block)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject arg0, IRubyObject arg1)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject arg0, IRubyObject arg1, Block block)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)
           
static IRubyObject invoke(ThreadContext context, IRubyObject self, java.lang.String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
           
static IRubyObject invokeAs(ThreadContext context, RubyClass asClass, IRubyObject self, java.lang.String name, Block block)
           
static IRubyObject invokeAs(ThreadContext context, RubyClass asClass, IRubyObject self, java.lang.String name, IRubyObject[] args, Block block)
           
static IRubyObject invokeAs(ThreadContext context, RubyClass asClass, IRubyObject self, java.lang.String name, IRubyObject arg0, Block block)
           
static IRubyObject invokeAs(ThreadContext context, RubyClass asClass, IRubyObject self, java.lang.String name, IRubyObject arg0, IRubyObject arg1, Block block)
           
static IRubyObject invokeAs(ThreadContext context, RubyClass asClass, IRubyObject self, java.lang.String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
           
static IRubyObject invokeChecked(ThreadContext context, IRubyObject self, java.lang.String name)
           
static IRubyObject invokedynamic(ThreadContext context, IRubyObject self, int index)
           
static IRubyObject invokedynamic(ThreadContext context, IRubyObject self, int index, IRubyObject arg0)
           
static boolean invokeEqqForCaselessWhen(IRubyObject receiver)
           
static boolean invokeEqqForCaselessWhen(IRubyObject receiver0, IRubyObject receiver1)
           
static boolean invokeEqqForCaselessWhen(IRubyObject receiver0, IRubyObject receiver1, IRubyObject receiver2)
           
static boolean invokeEqqForCaseWhen(CallSite callSite, ThreadContext context, IRubyObject caller, IRubyObject arg, IRubyObject receiver)
           
static boolean invokeEqqForCaseWhen(CallSite callSite, ThreadContext context, IRubyObject caller, IRubyObject arg, IRubyObject[] receivers)
           
static boolean invokeEqqForCaseWhen(CallSite callSite, ThreadContext context, IRubyObject caller, IRubyObject arg, IRubyObject receiver0, IRubyObject receiver1)
           
static boolean invokeEqqForCaseWhen(CallSite callSite, ThreadContext context, IRubyObject caller, IRubyObject arg, IRubyObject receiver0, IRubyObject receiver1, IRubyObject receiver2)
           
static IRubyObject invokeMethodMissing(IRubyObject receiver, java.lang.String name, IRubyObject[] args)
           
static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, Block block)
           
static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
          The protocol for super method invocation is a bit complicated in Ruby.
static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject arg0, Block block)
           
static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject arg0, IRubyObject arg1, Block block)
           
static IRubyObject invokeSuper(ThreadContext context, IRubyObject self, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
           
static IRubyObject isExceptionHandled(IRubyObject currentException, IRubyObject exception, ThreadContext context)
           
static IRubyObject isExceptionHandled(RubyException currentException, IRubyObject[] exceptions, ThreadContext context)
           
static IRubyObject isExceptionHandled(RubyException currentException, IRubyObject exception0, IRubyObject exception1, IRubyObject exception2, ThreadContext context)
           
static IRubyObject isExceptionHandled(RubyException currentException, IRubyObject exception0, IRubyObject exception1, ThreadContext context)
           
static IRubyObject isExceptionHandled(RubyException currentException, IRubyObject exception, ThreadContext context)
           
static boolean isFastSwitchableSingleCharString(IRubyObject str)
           
static boolean isFastSwitchableSingleCharSymbol(IRubyObject sym)
           
static boolean isFastSwitchableString(IRubyObject str)
           
static boolean isFastSwitchableSymbol(IRubyObject sym)
           
static boolean isGenerationEqual(IRubyObject object, int generation)
           
static IRubyObject isJavaExceptionHandled(java.lang.Throwable currentThrowable, IRubyObject[] throwables, ThreadContext context)
           
static IRubyObject isJavaExceptionHandled(java.lang.Throwable currentThrowable, IRubyObject throwable0, IRubyObject throwable1, IRubyObject throwable2, ThreadContext context)
           
static IRubyObject isJavaExceptionHandled(java.lang.Throwable currentThrowable, IRubyObject throwable0, IRubyObject throwable1, ThreadContext context)
           
static IRubyObject isJavaExceptionHandled(java.lang.Throwable currentThrowable, IRubyObject throwable, ThreadContext context)
           
static boolean isModuleAndHasConstant(IRubyObject left, java.lang.String name)
           
static RubyBoolean isWhenTriggered(IRubyObject expression, IRubyObject expressionsObject, ThreadContext context)
           
static IRubyObject match2AndUpdateScope(IRubyObject receiver, ThreadContext context, IRubyObject value, java.lang.String scopeOffsets)
           
static IRubyObject match3(RubyRegexp regexp, IRubyObject value, ThreadContext context)
           
static RubyClass metaclass(IRubyObject object)
           
static IRubyObject negate(IRubyObject value, Ruby runtime)
           
static RubyProc newLiteralLambda(ThreadContext context, Block block, IRubyObject self)
           
static IRubyObject nextJump(IRubyObject value)
           
static IRubyObject nextLocalJumpError(Ruby runtime, IRubyObject value)
           
static IRubyObject nullToNil(IRubyObject value, Ruby runtime)
           
static IRubyObject opAsgnWithMethod(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject arg, CallSite varSite, CallSite opSite, CallSite opAsgnSite)
           
static IRubyObject opElementAsgnWithMethod(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject[] args, IRubyObject value, CallSite elementSite, CallSite opSite, CallSite elementAsgnSite)
           
static IRubyObject opElementAsgnWithMethod(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject value, CallSite elementSite, CallSite opSite, CallSite elementAsgnSite)
           
static IRubyObject opElementAsgnWithMethod(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject arg, IRubyObject value, CallSite elementSite, CallSite opSite, CallSite elementAsgnSite)
           
static IRubyObject opElementAsgnWithMethod(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject arg1, IRubyObject arg2, IRubyObject value, CallSite elementSite, CallSite opSite, CallSite elementAsgnSite)
           
static IRubyObject opElementAsgnWithMethod(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, IRubyObject value, CallSite elementSite, CallSite opSite, CallSite elementAsgnSite)
           
static IRubyObject opElementAsgnWithOrPartTwoNArgs(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject[] args, IRubyObject value, CallSite asetSite)
           
static IRubyObject opElementAsgnWithOrPartTwoOneArg(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject arg, IRubyObject value, CallSite asetSite)
           
static IRubyObject opElementAsgnWithOrPartTwoThreeArgs(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject[] args, IRubyObject value, CallSite asetSite)
           
static IRubyObject opElementAsgnWithOrPartTwoTwoArgs(ThreadContext context, IRubyObject self, IRubyObject receiver, IRubyObject[] args, IRubyObject value, CallSite asetSite)
           
static IRubyObject optElementOrNull(IRubyObject[] input, int element, int postCount)
           
static RubyArray parameterListToParameters(Ruby runtime, java.lang.String[] parameterList, boolean isLambda)
           
static java.lang.String[][] parseBlockDescriptor(java.lang.String descriptor)
           
static IRubyObject postElementOrNil(IRubyObject[] input, int postCount, int postIndex, IRubyObject nil)
           
static void postLoad(ThreadContext context)
           
static IRubyObject postOpAsgnWithOrAnd(IRubyObject receiver, IRubyObject value, ThreadContext context, IRubyObject self, CallSite varAsgnSite)
           
static void preLoad(ThreadContext context, java.lang.String scopeString)
           
static void preLoad(ThreadContext context, java.lang.String[] varNames)
           
static IRubyObject preOpAsgnWithOrAnd(IRubyObject receiver, ThreadContext context, IRubyObject self, CallSite varSite)
           
static RubyModule prepareClassNamespace(ThreadContext context, IRubyObject rubyModule)
           
static RubyClass prepareSuperClass(Ruby runtime, IRubyObject rubyClass)
           
static IRubyObject processBlockArgument(Ruby runtime, Block block)
           
static java.lang.String rawBytesToString(byte[] bytes)
           
static RubyBoolean rbEqual(ThreadContext context, IRubyObject a, IRubyObject b)
          Equivalent to rb_equal in MRI
static IRubyObject redoJump()
           
static IRubyObject redoLocalJumpError(Ruby runtime)
           
static void registerEndBlock(Block block, Ruby runtime)
           
static IRubyObject retryJump()
           
static JumpException.ReturnJump returnJump(IRubyObject result, ThreadContext context)
           
static IRubyObject runBeginBlock(ThreadContext context, IRubyObject self, java.lang.String scopeString, CompiledBlockCallback callback)
           
static CallSite selectAttrAsgnCallSite(IRubyObject receiver, IRubyObject self, CallSite normalSite, CallSite variableSite)
           
static DynamicMethod selectMethodMissing(RubyClass selfClass, Visibility visibility, java.lang.String name, CallType callType)
           
static DynamicMethod selectMethodMissing(ThreadContext context, IRubyObject receiver, Visibility visibility, java.lang.String name, CallType callType)
           
static DynamicMethod selectMethodMissing(ThreadContext context, RubyClass selfClass, Visibility visibility, java.lang.String name, CallType callType)
           
static IRubyObject setBackref(Ruby runtime, ThreadContext context, IRubyObject value)
           
static IRubyObject setClassVariable(ThreadContext context, Ruby runtime, IRubyObject self, java.lang.String name, IRubyObject value)
           
static IRubyObject setConstantInCurrent(IRubyObject value, ThreadContext context, java.lang.String name)
           
static IRubyObject setConstantInModule(IRubyObject module, IRubyObject value, java.lang.String name, ThreadContext context)
           
static void setErrorInfo(Ruby runtime, IRubyObject error)
           
static IRubyObject setGlobalVariable(IRubyObject value, Ruby runtime, java.lang.String name)
           
static IRubyObject setInstanceVariable(IRubyObject value, IRubyObject self, java.lang.String name)
           
static IRubyObject setLastLine(Ruby runtime, ThreadContext context, IRubyObject value)
           
static RubyArray splatValue(IRubyObject value)
           
static RubyArray splatValue19(IRubyObject value)
           
static void storeExceptionInErrorInfo(java.lang.Throwable currentThrowable, ThreadContext context)
           
static IRubyObject stringOrNil(org.jruby.util.ByteList value, ThreadContext context)
           
static byte[] stringToRawBytes(java.lang.String string)
           
static RubyArray subarrayOrEmpty(RubyArray array, Ruby runtime, int index)
           
static RubyArray subarrayOrEmpty(RubyArray array, Ruby runtime, int index, int post)
           
static void traceClass(ThreadContext context)
           
static void traceEnd(ThreadContext context)
           
static void traceLine(ThreadContext context)
           
static IRubyObject undefMethod(ThreadContext context, java.lang.Object nameArg)
           
static IRubyObject unwrapLocalJumpErrorValue(RaiseException re)
           
static java.lang.Throwable unwrapRedoNextBreakOrJustLocalJump(RaiseException re, ThreadContext context)
          If it's Redo, Next, or Break, rethrow it as a normal exception for while to handle
static void updateScopeWithCaptures(ThreadContext context, DynamicScope scope, int[] scopeOffsets, IRubyObject result)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_SPECIFIC_ARITY_OBJECT_ARRAY

public static final int MAX_SPECIFIC_ARITY_OBJECT_ARRAY
See Also:
Constant Field Values

MAX_SPECIFIC_ARITY_HASH

public static final int MAX_SPECIFIC_ARITY_HASH
See Also:
Constant Field Values
Constructor Detail

RuntimeHelpers

public RuntimeHelpers()
Method Detail

selectAttrAsgnCallSite

public static CallSite selectAttrAsgnCallSite(IRubyObject receiver,
                                              IRubyObject self,
                                              CallSite normalSite,
                                              CallSite variableSite)

doAttrAsgn

public static IRubyObject doAttrAsgn(IRubyObject receiver,
                                     CallSite callSite,
                                     IRubyObject value,
                                     ThreadContext context,
                                     IRubyObject caller)

doAttrAsgn

public static IRubyObject doAttrAsgn(IRubyObject receiver,
                                     CallSite callSite,
                                     IRubyObject arg0,
                                     IRubyObject value,
                                     ThreadContext context,
                                     IRubyObject caller)

doAttrAsgn

public static IRubyObject doAttrAsgn(IRubyObject receiver,
                                     CallSite callSite,
                                     IRubyObject arg0,
                                     IRubyObject arg1,
                                     IRubyObject value,
                                     ThreadContext context,
                                     IRubyObject caller)

doAttrAsgn

public static IRubyObject doAttrAsgn(IRubyObject receiver,
                                     CallSite callSite,
                                     IRubyObject arg0,
                                     IRubyObject arg1,
                                     IRubyObject arg2,
                                     IRubyObject value,
                                     ThreadContext context,
                                     IRubyObject caller)

doAttrAsgn

public static IRubyObject doAttrAsgn(IRubyObject receiver,
                                     CallSite callSite,
                                     IRubyObject[] args,
                                     ThreadContext context,
                                     IRubyObject caller)

doAttrAsgn

public static IRubyObject doAttrAsgn(IRubyObject receiver,
                                     CallSite callSite,
                                     IRubyObject[] args,
                                     IRubyObject value,
                                     ThreadContext context,
                                     IRubyObject caller)

invokeEqqForCaseWhen

public static boolean invokeEqqForCaseWhen(CallSite callSite,
                                           ThreadContext context,
                                           IRubyObject caller,
                                           IRubyObject arg,
                                           IRubyObject[] receivers)

invokeEqqForCaseWhen

public static boolean invokeEqqForCaseWhen(CallSite callSite,
                                           ThreadContext context,
                                           IRubyObject caller,
                                           IRubyObject arg,
                                           IRubyObject receiver)

invokeEqqForCaseWhen

public static boolean invokeEqqForCaseWhen(CallSite callSite,
                                           ThreadContext context,
                                           IRubyObject caller,
                                           IRubyObject arg,
                                           IRubyObject receiver0,
                                           IRubyObject receiver1)

invokeEqqForCaseWhen

public static boolean invokeEqqForCaseWhen(CallSite callSite,
                                           ThreadContext context,
                                           IRubyObject caller,
                                           IRubyObject arg,
                                           IRubyObject receiver0,
                                           IRubyObject receiver1,
                                           IRubyObject receiver2)

areAnyTrueForCaselessWhen

public static boolean areAnyTrueForCaselessWhen(IRubyObject[] receivers)

invokeEqqForCaselessWhen

public static boolean invokeEqqForCaselessWhen(IRubyObject receiver)

invokeEqqForCaselessWhen

public static boolean invokeEqqForCaselessWhen(IRubyObject receiver0,
                                               IRubyObject receiver1)

invokeEqqForCaselessWhen

public static boolean invokeEqqForCaselessWhen(IRubyObject receiver0,
                                               IRubyObject receiver1,
                                               IRubyObject receiver2)

createBlockCallback

public static CompiledBlockCallback createBlockCallback(Ruby runtime,
                                                        java.lang.Object scriptObject,
                                                        java.lang.String closureMethod,
                                                        java.lang.String file,
                                                        int line)

createBlockCallback19

public static CompiledBlockCallback19 createBlockCallback19(Ruby runtime,
                                                            java.lang.Object scriptObject,
                                                            java.lang.String closureMethod,
                                                            java.lang.String file,
                                                            int line)

createBlockCallbackOffline

public static byte[] createBlockCallbackOffline(java.lang.String classPath,
                                                java.lang.String closureMethod,
                                                java.lang.String file,
                                                int line)

createBlockCallback19Offline

public static byte[] createBlockCallback19Offline(java.lang.String classPath,
                                                  java.lang.String closureMethod,
                                                  java.lang.String file,
                                                  int line)

buildBlockDescriptor19

public static java.lang.String buildBlockDescriptor19(java.lang.String closureMethod,
                                                      int arity,
                                                      StaticScope scope,
                                                      java.lang.String file,
                                                      int line,
                                                      boolean hasMultipleArgsHead,
                                                      NodeType argsNodeId,
                                                      java.lang.String parameterList,
                                                      ASTInspector inspector)

buildBlockDescriptor

public static java.lang.String buildBlockDescriptor(java.lang.String closureMethod,
                                                    int arity,
                                                    StaticScope scope,
                                                    java.lang.String file,
                                                    int line,
                                                    boolean hasMultipleArgsHead,
                                                    NodeType argsNodeId,
                                                    ASTInspector inspector)

parseBlockDescriptor

public static java.lang.String[][] parseBlockDescriptor(java.lang.String descriptor)

createCompiledBlockBody

public static BlockBody createCompiledBlockBody(ThreadContext context,
                                                java.lang.Object scriptObject,
                                                java.lang.String descriptor)

createCompiledBlockBody

public static BlockBody createCompiledBlockBody(ThreadContext context,
                                                java.lang.Object scriptObject,
                                                java.lang.String closureMethod,
                                                int arity,
                                                java.lang.String[] staticScopeNames,
                                                boolean hasMultipleArgsHead,
                                                int argsNodeType,
                                                java.lang.String file,
                                                int line,
                                                boolean light)

createCompiledBlockBody19

public static BlockBody createCompiledBlockBody19(ThreadContext context,
                                                  java.lang.Object scriptObject,
                                                  java.lang.String descriptor)

createCompiledBlockBody19

public static BlockBody createCompiledBlockBody19(ThreadContext context,
                                                  java.lang.Object scriptObject,
                                                  java.lang.String closureMethod,
                                                  int arity,
                                                  java.lang.String[] staticScopeNames,
                                                  boolean hasMultipleArgsHead,
                                                  int argsNodeType,
                                                  java.lang.String file,
                                                  int line,
                                                  boolean light,
                                                  java.lang.String parameterList)

createBlock

public static Block createBlock(ThreadContext context,
                                IRubyObject self,
                                BlockBody body)

createBlock19

public static Block createBlock19(ThreadContext context,
                                  IRubyObject self,
                                  BlockBody body)

runBeginBlock

public static IRubyObject runBeginBlock(ThreadContext context,
                                        IRubyObject self,
                                        java.lang.String scopeString,
                                        CompiledBlockCallback callback)

createSharedScopeBlock

public static Block createSharedScopeBlock(ThreadContext context,
                                           IRubyObject self,
                                           int arity,
                                           CompiledBlockCallback callback,
                                           boolean hasMultipleArgsHead,
                                           int argsNodeType)

def

public static IRubyObject def(ThreadContext context,
                              IRubyObject self,
                              java.lang.Object scriptObject,
                              java.lang.String name,
                              java.lang.String javaName,
                              java.lang.String scopeString,
                              int arity,
                              java.lang.String filename,
                              int line,
                              CallConfiguration callConfig,
                              java.lang.String parameterDesc)

defs

public static IRubyObject defs(ThreadContext context,
                               IRubyObject self,
                               IRubyObject receiver,
                               java.lang.Object scriptObject,
                               java.lang.String name,
                               java.lang.String javaName,
                               java.lang.String scopeString,
                               int arity,
                               java.lang.String filename,
                               int line,
                               CallConfiguration callConfig,
                               java.lang.String parameterDesc)

defOffline

public static byte[] defOffline(java.lang.String name,
                                java.lang.String classPath,
                                java.lang.String invokerName,
                                Arity arity,
                                StaticScope scope,
                                CallConfiguration callConfig,
                                java.lang.String filename,
                                int line)

getSingletonClass

public static RubyClass getSingletonClass(Ruby runtime,
                                          IRubyObject receiver)

invokeMethodMissing

public static IRubyObject invokeMethodMissing(IRubyObject receiver,
                                              java.lang.String name,
                                              IRubyObject[] args)

callMethodMissing

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

callMethodMissing

public static IRubyObject callMethodMissing(ThreadContext context,
                                            IRubyObject receiver,
                                            Visibility visibility,
                                            java.lang.String name,
                                            CallType callType,
                                            IRubyObject arg0,
                                            Block block)

callMethodMissing

public static IRubyObject callMethodMissing(ThreadContext context,
                                            IRubyObject receiver,
                                            Visibility visibility,
                                            java.lang.String name,
                                            CallType callType,
                                            IRubyObject arg0,
                                            IRubyObject arg1,
                                            Block block)

callMethodMissing

public static IRubyObject callMethodMissing(ThreadContext context,
                                            IRubyObject receiver,
                                            Visibility visibility,
                                            java.lang.String name,
                                            CallType callType,
                                            IRubyObject arg0,
                                            IRubyObject arg1,
                                            IRubyObject arg2,
                                            Block block)

callMethodMissing

public static IRubyObject callMethodMissing(ThreadContext context,
                                            IRubyObject receiver,
                                            Visibility visibility,
                                            java.lang.String name,
                                            CallType callType,
                                            Block block)

selectMethodMissing

public static DynamicMethod selectMethodMissing(ThreadContext context,
                                                IRubyObject receiver,
                                                Visibility visibility,
                                                java.lang.String name,
                                                CallType callType)

selectMethodMissing

public static DynamicMethod selectMethodMissing(ThreadContext context,
                                                RubyClass selfClass,
                                                Visibility visibility,
                                                java.lang.String name,
                                                CallType callType)

selectMethodMissing

public static DynamicMethod selectMethodMissing(RubyClass selfClass,
                                                Visibility visibility,
                                                java.lang.String name,
                                                CallType callType)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 Block block)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 IRubyObject arg0,
                                 Block block)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 Block block)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 IRubyObject arg2,
                                 Block block)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 IRubyObject[] args,
                                 Block block)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 IRubyObject arg0)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 IRubyObject arg0,
                                 IRubyObject arg1)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 IRubyObject arg0,
                                 IRubyObject arg1,
                                 IRubyObject arg2)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 IRubyObject... args)

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 CallType callType)

invoke

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

invoke

public static IRubyObject invoke(ThreadContext context,
                                 IRubyObject self,
                                 java.lang.String name,
                                 IRubyObject arg,
                                 CallType callType,
                                 Block block)

invokeAs

public static IRubyObject invokeAs(ThreadContext context,
                                   RubyClass asClass,
                                   IRubyObject self,
                                   java.lang.String name,
                                   IRubyObject[] args,
                                   Block block)

invokeAs

public static IRubyObject invokeAs(ThreadContext context,
                                   RubyClass asClass,
                                   IRubyObject self,
                                   java.lang.String name,
                                   Block block)

invokeAs

public static IRubyObject invokeAs(ThreadContext context,
                                   RubyClass asClass,
                                   IRubyObject self,
                                   java.lang.String name,
                                   IRubyObject arg0,
                                   Block block)

invokeAs

public static IRubyObject invokeAs(ThreadContext context,
                                   RubyClass asClass,
                                   IRubyObject self,
                                   java.lang.String name,
                                   IRubyObject arg0,
                                   IRubyObject arg1,
                                   Block block)

invokeAs

public static IRubyObject invokeAs(ThreadContext context,
                                   RubyClass asClass,
                                   IRubyObject self,
                                   java.lang.String name,
                                   IRubyObject arg0,
                                   IRubyObject arg1,
                                   IRubyObject arg2,
                                   Block block)

invokeChecked

public static IRubyObject invokeChecked(ThreadContext context,
                                        IRubyObject self,
                                        java.lang.String name)

invokeSuper

public static IRubyObject invokeSuper(ThreadContext context,
                                      IRubyObject self,
                                      IRubyObject[] args,
                                      Block block)
The protocol for super method invocation is a bit complicated in Ruby. In real terms it involves first finding the real implementation class (the super class), getting the name of the method to call from the frame, and then invoke that on the super class with the current self as the actual object invoking.


invokeSuper

public static IRubyObject invokeSuper(ThreadContext context,
                                      IRubyObject self,
                                      Block block)

invokeSuper

public static IRubyObject invokeSuper(ThreadContext context,
                                      IRubyObject self,
                                      IRubyObject arg0,
                                      Block block)

invokeSuper

public static IRubyObject invokeSuper(ThreadContext context,
                                      IRubyObject self,
                                      IRubyObject arg0,
                                      IRubyObject arg1,
                                      Block block)

invokeSuper

public static IRubyObject invokeSuper(ThreadContext context,
                                      IRubyObject self,
                                      IRubyObject arg0,
                                      IRubyObject arg1,
                                      IRubyObject arg2,
                                      Block block)

ensureRubyArray

public static RubyArray ensureRubyArray(IRubyObject value)

ensureRubyArray

public static RubyArray ensureRubyArray(Ruby runtime,
                                        IRubyObject value)

ensureMultipleAssignableRubyArray

public static RubyArray ensureMultipleAssignableRubyArray(IRubyObject value,
                                                          Ruby runtime,
                                                          boolean masgnHasHead)

fetchClassVariable

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

fastFetchClassVariable

public static IRubyObject fastFetchClassVariable(ThreadContext context,
                                                 Ruby runtime,
                                                 IRubyObject self,
                                                 java.lang.String internedName)

getConstant

public static IRubyObject getConstant(ThreadContext context,
                                      java.lang.String internedName)

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)

setClassVariable

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

fastSetClassVariable

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

declareClassVariable

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

fastDeclareClassVariable

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

handleArgumentSizes

public static void handleArgumentSizes(ThreadContext context,
                                       Ruby runtime,
                                       int given,
                                       int required,
                                       int opt,
                                       int rest)

unwrapRedoNextBreakOrJustLocalJump

public static java.lang.Throwable unwrapRedoNextBreakOrJustLocalJump(RaiseException re,
                                                                     ThreadContext context)
If it's Redo, Next, or Break, rethrow it as a normal exception for while to handle

Parameters:
re -
runtime -

getLocalJumpTypeOrRethrow

public static java.lang.String getLocalJumpTypeOrRethrow(RaiseException re)

unwrapLocalJumpErrorValue

public static IRubyObject unwrapLocalJumpErrorValue(RaiseException re)

processBlockArgument

public static IRubyObject processBlockArgument(Ruby runtime,
                                               Block block)

getBlockFromBlockPassBody

public static Block getBlockFromBlockPassBody(Ruby runtime,
                                              IRubyObject proc,
                                              Block currentBlock)

getBlockFromBlockPassBody

public static Block getBlockFromBlockPassBody(IRubyObject proc,
                                              Block currentBlock)

backref

public static IRubyObject backref(ThreadContext context)

backrefLastMatch

public static IRubyObject backrefLastMatch(ThreadContext context)

backrefMatchPre

public static IRubyObject backrefMatchPre(ThreadContext context)

backrefMatchPost

public static IRubyObject backrefMatchPost(ThreadContext context)

backrefMatchLast

public static IRubyObject backrefMatchLast(ThreadContext context)

getArgValues

public static IRubyObject[] getArgValues(ThreadContext context)

callZSuper

public static IRubyObject callZSuper(Ruby runtime,
                                     ThreadContext context,
                                     Block block,
                                     IRubyObject self)

appendToObjectArray

public static IRubyObject[] appendToObjectArray(IRubyObject[] array,
                                                IRubyObject add)

returnJump

public static JumpException.ReturnJump returnJump(IRubyObject result,
                                                  ThreadContext context)

breakJumpInWhile

public static IRubyObject breakJumpInWhile(JumpException.BreakJump bj,
                                           ThreadContext context)

breakJump

public static IRubyObject breakJump(ThreadContext context,
                                    IRubyObject value)

breakLocalJumpError

public static IRubyObject breakLocalJumpError(Ruby runtime,
                                              IRubyObject value)

concatObjectArrays

public static IRubyObject[] concatObjectArrays(IRubyObject[] array,
                                               IRubyObject[] add)

isExceptionHandled

public static IRubyObject isExceptionHandled(RubyException currentException,
                                             IRubyObject[] exceptions,
                                             ThreadContext context)

isExceptionHandled

public static IRubyObject isExceptionHandled(RubyException currentException,
                                             IRubyObject exception,
                                             ThreadContext context)

isExceptionHandled

public static IRubyObject isExceptionHandled(IRubyObject currentException,
                                             IRubyObject exception,
                                             ThreadContext context)

isExceptionHandled

public static IRubyObject isExceptionHandled(RubyException currentException,
                                             IRubyObject exception0,
                                             IRubyObject exception1,
                                             ThreadContext context)

isExceptionHandled

public static IRubyObject isExceptionHandled(RubyException currentException,
                                             IRubyObject exception0,
                                             IRubyObject exception1,
                                             IRubyObject exception2,
                                             ThreadContext context)

isJavaExceptionHandled

public static IRubyObject isJavaExceptionHandled(java.lang.Throwable currentThrowable,
                                                 IRubyObject[] throwables,
                                                 ThreadContext context)

isJavaExceptionHandled

public static IRubyObject isJavaExceptionHandled(java.lang.Throwable currentThrowable,
                                                 IRubyObject throwable,
                                                 ThreadContext context)

isJavaExceptionHandled

public static IRubyObject isJavaExceptionHandled(java.lang.Throwable currentThrowable,
                                                 IRubyObject throwable0,
                                                 IRubyObject throwable1,
                                                 ThreadContext context)

isJavaExceptionHandled

public static IRubyObject isJavaExceptionHandled(java.lang.Throwable currentThrowable,
                                                 IRubyObject throwable0,
                                                 IRubyObject throwable1,
                                                 IRubyObject throwable2,
                                                 ThreadContext context)

storeExceptionInErrorInfo

public static void storeExceptionInErrorInfo(java.lang.Throwable currentThrowable,
                                             ThreadContext context)

clearErrorInfo

public static void clearErrorInfo(ThreadContext context)

checkSuperDisabledOrOutOfMethod

public static void checkSuperDisabledOrOutOfMethod(ThreadContext context)

ensureSuperBlock

public static Block ensureSuperBlock(Block given,
                                     Block parent)

findImplementerIfNecessary

public static RubyModule findImplementerIfNecessary(RubyModule clazz,
                                                    RubyModule implementationClass)

createSubarray

public static RubyArray createSubarray(RubyArray input,
                                       int start)

createSubarray

public static RubyArray createSubarray(RubyArray input,
                                       int start,
                                       int post)

createSubarray

public static RubyArray createSubarray(IRubyObject[] input,
                                       Ruby runtime,
                                       int start)

createSubarray

public static RubyArray createSubarray(IRubyObject[] input,
                                       Ruby runtime,
                                       int start,
                                       int exclude)

elementOrNull

public static IRubyObject elementOrNull(IRubyObject[] input,
                                        int element)

optElementOrNull

public static IRubyObject optElementOrNull(IRubyObject[] input,
                                           int element,
                                           int postCount)

elementOrNil

public static IRubyObject elementOrNil(IRubyObject[] input,
                                       int element,
                                       IRubyObject nil)

postElementOrNil

public static IRubyObject postElementOrNil(IRubyObject[] input,
                                           int postCount,
                                           int postIndex,
                                           IRubyObject nil)

isWhenTriggered

public static RubyBoolean isWhenTriggered(IRubyObject expression,
                                          IRubyObject expressionsObject,
                                          ThreadContext context)

setConstantInModule

public static IRubyObject setConstantInModule(IRubyObject module,
                                              IRubyObject value,
                                              java.lang.String name,
                                              ThreadContext context)

setConstantInCurrent

public static IRubyObject setConstantInCurrent(IRubyObject value,
                                               ThreadContext context,
                                               java.lang.String name)

retryJump

public static IRubyObject retryJump()

redoJump

public static IRubyObject redoJump()

redoLocalJumpError

public static IRubyObject redoLocalJumpError(Ruby runtime)

nextJump

public static IRubyObject nextJump(IRubyObject value)

nextLocalJumpError

public static IRubyObject nextLocalJumpError(Ruby runtime,
                                             IRubyObject value)

constructObjectArray

public static IRubyObject[] constructObjectArray(IRubyObject one)

constructObjectArray

public static IRubyObject[] constructObjectArray(IRubyObject one,
                                                 IRubyObject two)

constructObjectArray

public static IRubyObject[] constructObjectArray(IRubyObject one,
                                                 IRubyObject two,
                                                 IRubyObject three)

constructObjectArray

public static IRubyObject[] constructObjectArray(IRubyObject one,
                                                 IRubyObject two,
                                                 IRubyObject three,
                                                 IRubyObject four)

constructObjectArray

public static IRubyObject[] constructObjectArray(IRubyObject one,
                                                 IRubyObject two,
                                                 IRubyObject three,
                                                 IRubyObject four,
                                                 IRubyObject five)

constructRubyArray

public static RubyArray constructRubyArray(Ruby runtime,
                                           IRubyObject one)

constructRubyArray

public static RubyArray constructRubyArray(Ruby runtime,
                                           IRubyObject one,
                                           IRubyObject two)

constructRubyArray

public static RubyArray constructRubyArray(Ruby runtime,
                                           IRubyObject one,
                                           IRubyObject two,
                                           IRubyObject three)

constructRubyArray

public static RubyArray constructRubyArray(Ruby runtime,
                                           IRubyObject one,
                                           IRubyObject two,
                                           IRubyObject three,
                                           IRubyObject four)

constructRubyArray

public static RubyArray constructRubyArray(Ruby runtime,
                                           IRubyObject one,
                                           IRubyObject two,
                                           IRubyObject three,
                                           IRubyObject four,
                                           IRubyObject five)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one,
                                                      java.lang.String two)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one,
                                                      java.lang.String two,
                                                      java.lang.String three)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one,
                                                      java.lang.String two,
                                                      java.lang.String three,
                                                      java.lang.String four)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one,
                                                      java.lang.String two,
                                                      java.lang.String three,
                                                      java.lang.String four,
                                                      java.lang.String five)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one,
                                                      java.lang.String two,
                                                      java.lang.String three,
                                                      java.lang.String four,
                                                      java.lang.String five,
                                                      java.lang.String six)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one,
                                                      java.lang.String two,
                                                      java.lang.String three,
                                                      java.lang.String four,
                                                      java.lang.String five,
                                                      java.lang.String six,
                                                      java.lang.String seven)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one,
                                                      java.lang.String two,
                                                      java.lang.String three,
                                                      java.lang.String four,
                                                      java.lang.String five,
                                                      java.lang.String six,
                                                      java.lang.String seven,
                                                      java.lang.String eight)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one,
                                                      java.lang.String two,
                                                      java.lang.String three,
                                                      java.lang.String four,
                                                      java.lang.String five,
                                                      java.lang.String six,
                                                      java.lang.String seven,
                                                      java.lang.String eight,
                                                      java.lang.String nine)

constructStringArray

public static java.lang.String[] constructStringArray(java.lang.String one,
                                                      java.lang.String two,
                                                      java.lang.String three,
                                                      java.lang.String four,
                                                      java.lang.String five,
                                                      java.lang.String six,
                                                      java.lang.String seven,
                                                      java.lang.String eight,
                                                      java.lang.String nine,
                                                      java.lang.String ten)

constructHash

public static RubyHash constructHash(Ruby runtime,
                                     IRubyObject key1,
                                     IRubyObject value1)

constructHash

public static RubyHash constructHash(Ruby runtime,
                                     IRubyObject key1,
                                     IRubyObject value1,
                                     IRubyObject key2,
                                     IRubyObject value2)

constructHash

public static RubyHash constructHash(Ruby runtime,
                                     IRubyObject key1,
                                     IRubyObject value1,
                                     IRubyObject key2,
                                     IRubyObject value2,
                                     IRubyObject key3,
                                     IRubyObject value3)

constructHash19

public static RubyHash constructHash19(Ruby runtime,
                                       IRubyObject key1,
                                       IRubyObject value1)

constructHash19

public static RubyHash constructHash19(Ruby runtime,
                                       IRubyObject key1,
                                       IRubyObject value1,
                                       IRubyObject key2,
                                       IRubyObject value2)

constructHash19

public static RubyHash constructHash19(Ruby runtime,
                                       IRubyObject key1,
                                       IRubyObject value1,
                                       IRubyObject key2,
                                       IRubyObject value2,
                                       IRubyObject key3,
                                       IRubyObject value3)

undefMethod

public static IRubyObject undefMethod(ThreadContext context,
                                      java.lang.Object nameArg)

defineAlias

public static IRubyObject defineAlias(ThreadContext context,
                                      IRubyObject self,
                                      java.lang.Object newNameArg,
                                      java.lang.Object oldNameArg)

negate

public static IRubyObject negate(IRubyObject value,
                                 Ruby runtime)

stringOrNil

public static IRubyObject stringOrNil(org.jruby.util.ByteList value,
                                      ThreadContext context)

preLoad

public static void preLoad(ThreadContext context,
                           java.lang.String[] varNames)

preLoad

public static void preLoad(ThreadContext context,
                           java.lang.String scopeString)

postLoad

public static void postLoad(ThreadContext context)

registerEndBlock

public static void registerEndBlock(Block block,
                                    Ruby runtime)

match3

public static IRubyObject match3(RubyRegexp regexp,
                                 IRubyObject value,
                                 ThreadContext context)

getErrorInfo

public static IRubyObject getErrorInfo(Ruby runtime)

setErrorInfo

public static void setErrorInfo(Ruby runtime,
                                IRubyObject error)

setLastLine

public static IRubyObject setLastLine(Ruby runtime,
                                      ThreadContext context,
                                      IRubyObject value)

getLastLine

public static IRubyObject getLastLine(Ruby runtime,
                                      ThreadContext context)

setBackref

public static IRubyObject setBackref(Ruby runtime,
                                     ThreadContext context,
                                     IRubyObject value)

getBackref

public static IRubyObject getBackref(Ruby runtime,
                                     ThreadContext context)

preOpAsgnWithOrAnd

public static IRubyObject preOpAsgnWithOrAnd(IRubyObject receiver,
                                             ThreadContext context,
                                             IRubyObject self,
                                             CallSite varSite)

postOpAsgnWithOrAnd

public static IRubyObject postOpAsgnWithOrAnd(IRubyObject receiver,
                                              IRubyObject value,
                                              ThreadContext context,
                                              IRubyObject self,
                                              CallSite varAsgnSite)

opAsgnWithMethod

public static IRubyObject opAsgnWithMethod(ThreadContext context,
                                           IRubyObject self,
                                           IRubyObject receiver,
                                           IRubyObject arg,
                                           CallSite varSite,
                                           CallSite opSite,
                                           CallSite opAsgnSite)

opElementAsgnWithMethod

public static IRubyObject opElementAsgnWithMethod(ThreadContext context,
                                                  IRubyObject self,
                                                  IRubyObject receiver,
                                                  IRubyObject value,
                                                  CallSite elementSite,
                                                  CallSite opSite,
                                                  CallSite elementAsgnSite)

opElementAsgnWithMethod

public static IRubyObject opElementAsgnWithMethod(ThreadContext context,
                                                  IRubyObject self,
                                                  IRubyObject receiver,
                                                  IRubyObject arg,
                                                  IRubyObject value,
                                                  CallSite elementSite,
                                                  CallSite opSite,
                                                  CallSite elementAsgnSite)

opElementAsgnWithMethod

public static IRubyObject opElementAsgnWithMethod(ThreadContext context,
                                                  IRubyObject self,
                                                  IRubyObject receiver,
                                                  IRubyObject arg1,
                                                  IRubyObject arg2,
                                                  IRubyObject value,
                                                  CallSite elementSite,
                                                  CallSite opSite,
                                                  CallSite elementAsgnSite)

opElementAsgnWithMethod

public static IRubyObject opElementAsgnWithMethod(ThreadContext context,
                                                  IRubyObject self,
                                                  IRubyObject receiver,
                                                  IRubyObject arg1,
                                                  IRubyObject arg2,
                                                  IRubyObject arg3,
                                                  IRubyObject value,
                                                  CallSite elementSite,
                                                  CallSite opSite,
                                                  CallSite elementAsgnSite)

opElementAsgnWithMethod

public static IRubyObject opElementAsgnWithMethod(ThreadContext context,
                                                  IRubyObject self,
                                                  IRubyObject receiver,
                                                  IRubyObject[] args,
                                                  IRubyObject value,
                                                  CallSite elementSite,
                                                  CallSite opSite,
                                                  CallSite elementAsgnSite)

opElementAsgnWithOrPartTwoOneArg

public static IRubyObject opElementAsgnWithOrPartTwoOneArg(ThreadContext context,
                                                           IRubyObject self,
                                                           IRubyObject receiver,
                                                           IRubyObject arg,
                                                           IRubyObject value,
                                                           CallSite asetSite)

opElementAsgnWithOrPartTwoTwoArgs

public static IRubyObject opElementAsgnWithOrPartTwoTwoArgs(ThreadContext context,
                                                            IRubyObject self,
                                                            IRubyObject receiver,
                                                            IRubyObject[] args,
                                                            IRubyObject value,
                                                            CallSite asetSite)

opElementAsgnWithOrPartTwoThreeArgs

public static IRubyObject opElementAsgnWithOrPartTwoThreeArgs(ThreadContext context,
                                                              IRubyObject self,
                                                              IRubyObject receiver,
                                                              IRubyObject[] args,
                                                              IRubyObject value,
                                                              CallSite asetSite)

opElementAsgnWithOrPartTwoNArgs

public static IRubyObject opElementAsgnWithOrPartTwoNArgs(ThreadContext context,
                                                          IRubyObject self,
                                                          IRubyObject receiver,
                                                          IRubyObject[] args,
                                                          IRubyObject value,
                                                          CallSite asetSite)

arrayValue

public static RubyArray arrayValue(IRubyObject value)

arrayValue

public static RubyArray arrayValue(ThreadContext context,
                                   Ruby runtime,
                                   IRubyObject value)

aryToAry

public static IRubyObject aryToAry(IRubyObject value)

aValueSplat

public static IRubyObject aValueSplat(IRubyObject value)

aValueSplat19

public static IRubyObject aValueSplat19(IRubyObject value)

splatValue

public static RubyArray splatValue(IRubyObject value)

splatValue19

public static RubyArray splatValue19(IRubyObject value)

addInstanceMethod

public static void addInstanceMethod(RubyModule containingClass,
                                     java.lang.String name,
                                     DynamicMethod method,
                                     Visibility visibility,
                                     ThreadContext context,
                                     Ruby runtime)

encodeScope

public static java.lang.String encodeScope(StaticScope scope)

decodeRootScope

public static LocalStaticScope decodeRootScope(ThreadContext context,
                                               java.lang.String scopeString)

decodeLocalScope

public static LocalStaticScope decodeLocalScope(ThreadContext context,
                                                java.lang.String scopeString)

decodeBlockScope

public static BlockStaticScope decodeBlockScope(ThreadContext context,
                                                java.lang.String scopeString)

arrayEntryOrNil

public static IRubyObject arrayEntryOrNil(RubyArray array,
                                          int index)

arrayEntryOrNilZero

public static IRubyObject arrayEntryOrNilZero(RubyArray array)

arrayEntryOrNilOne

public static IRubyObject arrayEntryOrNilOne(RubyArray array)

arrayEntryOrNilTwo

public static IRubyObject arrayEntryOrNilTwo(RubyArray array)

arrayPostOrNil

public static IRubyObject arrayPostOrNil(RubyArray array,
                                         int pre,
                                         int post,
                                         int index)

arrayPostOrNilZero

public static IRubyObject arrayPostOrNilZero(RubyArray array,
                                             int pre,
                                             int post)

arrayPostOrNilOne

public static IRubyObject arrayPostOrNilOne(RubyArray array,
                                            int pre,
                                            int post)

arrayPostOrNilTwo

public static IRubyObject arrayPostOrNilTwo(RubyArray array,
                                            int pre,
                                            int post)

subarrayOrEmpty

public static RubyArray subarrayOrEmpty(RubyArray array,
                                        Ruby runtime,
                                        int index)

subarrayOrEmpty

public static RubyArray subarrayOrEmpty(RubyArray array,
                                        Ruby runtime,
                                        int index,
                                        int post)

checkIsModule

public static RubyModule checkIsModule(IRubyObject maybeModule)

getGlobalVariable

public static IRubyObject getGlobalVariable(Ruby runtime,
                                            java.lang.String name)

setGlobalVariable

public static IRubyObject setGlobalVariable(IRubyObject value,
                                            Ruby runtime,
                                            java.lang.String name)

getInstanceVariable

public static IRubyObject getInstanceVariable(IRubyObject self,
                                              Ruby runtime,
                                              java.lang.String internedName)

setInstanceVariable

public static IRubyObject setInstanceVariable(IRubyObject value,
                                              IRubyObject self,
                                              java.lang.String name)

newLiteralLambda

public static RubyProc newLiteralLambda(ThreadContext context,
                                        Block block,
                                        IRubyObject self)

fillNil

public static void fillNil(IRubyObject[] arr,
                           int from,
                           int to,
                           Ruby runtime)

fillNil

public static void fillNil(IRubyObject[] arr,
                           Ruby runtime)

isFastSwitchableString

public static boolean isFastSwitchableString(IRubyObject str)

isFastSwitchableSingleCharString

public static boolean isFastSwitchableSingleCharString(IRubyObject str)

getFastSwitchString

public static int getFastSwitchString(IRubyObject str)

getFastSwitchSingleCharString

public static int getFastSwitchSingleCharString(IRubyObject str)

isFastSwitchableSymbol

public static boolean isFastSwitchableSymbol(IRubyObject sym)

isFastSwitchableSingleCharSymbol

public static boolean isFastSwitchableSingleCharSymbol(IRubyObject sym)

getFastSwitchSymbol

public static int getFastSwitchSymbol(IRubyObject sym)

getFastSwitchSingleCharSymbol

public static int getFastSwitchSingleCharSymbol(IRubyObject sym)

getBlock

public static Block getBlock(ThreadContext context,
                             IRubyObject self,
                             Node node)

getBlock

public static Block getBlock(Ruby runtime,
                             ThreadContext context,
                             IRubyObject self,
                             Node node,
                             Block aBlock)

rbEqual

public static RubyBoolean rbEqual(ThreadContext context,
                                  IRubyObject a,
                                  IRubyObject b)
Equivalent to rb_equal in MRI

Parameters:
context -
a -
b -
Returns:

traceLine

public static void traceLine(ThreadContext context)

traceClass

public static void traceClass(ThreadContext context)

traceEnd

public static void traceEnd(ThreadContext context)

interpretAliasUndefName

public static java.lang.String interpretAliasUndefName(Node nameNode,
                                                       Ruby runtime,
                                                       ThreadContext context,
                                                       IRubyObject self,
                                                       Block aBlock)
Some of this code looks scary. All names for an alias or undef is a fitem in 1.8/1.9 grammars. This means it is guaranteed to be either a LiteralNode of a DSymbolNode. Nothing else is possible. Also Interpreting a DSymbolNode will always yield a RubySymbol.


checkArgumentCount

public static void checkArgumentCount(ThreadContext context,
                                      IRubyObject[] args,
                                      int min,
                                      int max)
Used by the compiler to simplify arg checking in variable-arity paths

Parameters:
context - thread context
args - arguments array
min - minimum required
max - maximum allowed

checkArgumentCount

public static void checkArgumentCount(ThreadContext context,
                                      IRubyObject[] args,
                                      int req)
Used by the compiler to simplify arg checking in variable-arity paths

Parameters:
context - thread context
args - arguments array
req - required number

checkArgumentCount

public static void checkArgumentCount(ThreadContext context,
                                      int length,
                                      int min,
                                      int max)

isModuleAndHasConstant

public static boolean isModuleAndHasConstant(IRubyObject left,
                                             java.lang.String name)

getDefinedConstantOrBoundMethod

public static org.jruby.util.ByteList getDefinedConstantOrBoundMethod(IRubyObject left,
                                                                      java.lang.String name)

getSuperClassForDefined

public static RubyModule getSuperClassForDefined(Ruby runtime,
                                                 RubyModule klazz)

isGenerationEqual

public static boolean isGenerationEqual(IRubyObject object,
                                        int generation)

getScopeNames

public static java.lang.String[] getScopeNames(java.lang.String scopeNames)

arraySlice1N

public static IRubyObject[] arraySlice1N(IRubyObject arrayish)

arraySlice1

public static IRubyObject arraySlice1(IRubyObject arrayish)

metaclass

public static RubyClass metaclass(IRubyObject object)

rawBytesToString

public static java.lang.String rawBytesToString(byte[] bytes)

stringToRawBytes

public static byte[] stringToRawBytes(java.lang.String string)

encodeCaptureOffsets

public static java.lang.String encodeCaptureOffsets(int[] scopeOffsets)

decodeCaptureOffsets

public static int[] decodeCaptureOffsets(java.lang.String encoded)

match2AndUpdateScope

public static IRubyObject match2AndUpdateScope(IRubyObject receiver,
                                               ThreadContext context,
                                               IRubyObject value,
                                               java.lang.String scopeOffsets)

updateScopeWithCaptures

public static void updateScopeWithCaptures(ThreadContext context,
                                           DynamicScope scope,
                                           int[] scopeOffsets,
                                           IRubyObject result)

argsPush

public static RubyArray argsPush(RubyArray first,
                                 IRubyObject second)

argsCat

public static RubyArray argsCat(IRubyObject first,
                                IRubyObject second)

encodeParameterList

public static java.lang.String encodeParameterList(ArgsNode argsNode)

parameterListToParameters

public static RubyArray parameterListToParameters(Ruby runtime,
                                                  java.lang.String[] parameterList,
                                                  boolean isLambda)

getDefinedCall

public static org.jruby.util.ByteList getDefinedCall(ThreadContext context,
                                                     IRubyObject self,
                                                     IRubyObject receiver,
                                                     java.lang.String name)

getDefinedNot

public static org.jruby.util.ByteList getDefinedNot(Ruby runtime,
                                                    org.jruby.util.ByteList definition)

invokedynamic

public static IRubyObject invokedynamic(ThreadContext context,
                                        IRubyObject self,
                                        int index)

invokedynamic

public static IRubyObject invokedynamic(ThreadContext context,
                                        IRubyObject self,
                                        int index,
                                        IRubyObject arg0)


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