public class IRRuntimeHelpers extends Object
Constructor and Description |
---|
IRRuntimeHelpers() |
public static boolean inProfileMode()
public static boolean isDebug()
public static boolean inNonMethodBodyLambda(StaticScope scope, Block.Type blockType)
public static boolean inLambda(Block.Type blockType)
public static boolean inProc(Block.Type blockType)
public static void checkForLJE(ThreadContext context, DynamicScope dynScope, boolean maybeLambda, Block.Type blockType)
public static IRubyObject initiateNonLocalReturn(ThreadContext context, DynamicScope dynScope, Block.Type blockType, IRubyObject returnValue)
public static IRubyObject handleNonlocalReturn(StaticScope scope, DynamicScope dynScope, Object rjExc, Block.Type blockType) throws RuntimeException
RuntimeException
public static IRubyObject initiateBreak(ThreadContext context, DynamicScope dynScope, IRubyObject breakValue, Block.Type blockType) throws RuntimeException
RuntimeException
public static IRubyObject handleBreakAndReturnsInLambdas(ThreadContext context, StaticScope scope, DynamicScope dynScope, Object exc, Block.Type blockType) throws RuntimeException
RuntimeException
public static IRubyObject handlePropagatedBreak(ThreadContext context, DynamicScope dynScope, Object bjExc, Block.Type blockType)
public static void defCompiledIRMethod(ThreadContext context, java.lang.invoke.MethodHandle handle, String rubyName, DynamicScope currDynScope, IRubyObject self, IRScope irScope)
public static void defCompiledIRClassMethod(ThreadContext context, IRubyObject obj, java.lang.invoke.MethodHandle handle, String rubyName, IRScope irScope)
public static IRubyObject undefMethod(ThreadContext context, Object nameArg, DynamicScope currDynScope, IRubyObject self)
public static double unboxFloat(IRubyObject val)
public static long unboxFixnum(IRubyObject val)
public static boolean flt(double v1, double v2)
public static boolean fgt(double v1, double v2)
public static boolean feq(double v1, double v2)
public static boolean ilt(long v1, long v2)
public static boolean igt(long v1, long v2)
public static boolean ieq(long v1, long v2)
public static IRubyObject isExceptionHandled(ThreadContext context, IRubyObject excType, Object excObj)
public static IRubyObject isEQQ(ThreadContext context, IRubyObject receiver, IRubyObject value)
public static IRubyObject newProc(Ruby runtime, Block block)
public static IRubyObject yield(ThreadContext context, Object blk, Object yieldArg, boolean unwrapArray)
public static IRubyObject yieldSpecific(ThreadContext context, Object blk)
public static IRubyObject[] convertValueIntoArgArray(ThreadContext context, IRubyObject value, int blockArity, boolean argIsArray)
public static Block getBlockFromObject(ThreadContext context, Object value)
public static void checkArity(ThreadContext context, Object[] args, int required, int opt, boolean rest, boolean receivesKwargs, int restKey, Block.Type blockType)
public static void frobnicateKwargsArgument(ThreadContext context, int requiredArguments, IRubyObject[] args)
public static RubyHash extractKwargsHash(Object[] args, int requiredArgsCount, boolean receivesKwargs)
public static void checkForExtraUnwantedKeywordArgs(ThreadContext context, RubyHash keywordArgs)
public static IRubyObject match3(ThreadContext context, RubyRegexp regexp, IRubyObject argValue)
public static IRubyObject extractOptionalArgument(RubyArray rubyArray, int minArgsLength, int index)
public static IRubyObject isDefinedBackref(ThreadContext context)
public static IRubyObject isDefinedGlobal(ThreadContext context, String name)
public static IRubyObject isDefinedNthRef(ThreadContext context, int matchNumber)
public static IRubyObject isDefinedClassVar(ThreadContext context, RubyModule receiver, String name)
public static IRubyObject isDefinedInstanceVar(ThreadContext context, IRubyObject receiver, String name)
public static IRubyObject isDefinedCall(ThreadContext context, IRubyObject self, IRubyObject receiver, String name)
public static IRubyObject isDefinedConstantOrMethod(ThreadContext context, IRubyObject receiver, String name)
public static IRubyObject isDefinedMethod(ThreadContext context, IRubyObject receiver, String name, boolean checkIfPublic)
public static IRubyObject isDefinedSuper(ThreadContext context, IRubyObject receiver)
protected static void checkSuperDisabledOrOutOfMethod(ThreadContext context, RubyModule frameClass, String methodName)
public static IRubyObject nthMatch(ThreadContext context, int matchNumber)
public static void defineAlias(ThreadContext context, IRubyObject self, DynamicScope currDynScope, String newNameString, String oldNameString)
public static RubyModule getModuleFromScope(ThreadContext context, StaticScope scope, IRubyObject arg)
public static IRubyObject mergeKeywordArguments(ThreadContext context, IRubyObject restKwarg, IRubyObject explcitKwarg)
public static RubyModule findInstanceMethodContainer(ThreadContext context, DynamicScope currDynScope, IRubyObject self)
public static RubyBoolean isBlockGiven(ThreadContext context, Object blk)
public static IRubyObject receiveRestArg(ThreadContext context, Object[] args, int required, int argIndex, boolean acceptsKeywordArguments)
public static IRubyObject constructRestArg(ThreadContext context, Object[] args, RubyHash keywordArguments, int required, int argIndex)
public static IRubyObject receivePostReqdArg(ThreadContext context, IRubyObject[] args, int preReqdArgsCount, int postReqdArgsCount, int argIndex, boolean acceptsKeywordArgument)
public static IRubyObject receiveOptArg(IRubyObject[] args, int requiredArgs, int preArgs, int argIndex, boolean acceptsKeywordArgument)
public static IRubyObject getPreArgSafe(ThreadContext context, IRubyObject[] args, int argIndex)
public static IRubyObject receiveKeywordArg(ThreadContext context, IRubyObject[] args, int required, String argName, boolean acceptsKeywordArgument)
public static IRubyObject receiveKeywordRestArg(ThreadContext context, IRubyObject[] args, int required, boolean keywordArgumentSupplied)
public static IRubyObject setCapturedVar(ThreadContext context, IRubyObject matchRes, String varName)
public static IRubyObject instanceSuperSplatArgs(ThreadContext context, IRubyObject self, String methodName, RubyModule definingModule, IRubyObject[] args, Block block, boolean[] splatMap)
public static IRubyObject instanceSuper(ThreadContext context, IRubyObject self, String methodName, RubyModule definingModule, IRubyObject[] args, Block block)
public static IRubyObject classSuperSplatArgs(ThreadContext context, IRubyObject self, String methodName, RubyModule definingModule, IRubyObject[] args, Block block, boolean[] splatMap)
public static IRubyObject classSuper(ThreadContext context, IRubyObject self, String methodName, RubyModule definingModule, IRubyObject[] args, Block block)
public static IRubyObject unresolvedSuperSplatArgs(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block, boolean[] splatMap)
public static IRubyObject unresolvedSuper(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block)
public static IRubyObject zSuperSplatArgs(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block, boolean[] splatMap)
public static IRubyObject[] splatArguments(IRubyObject[] args, boolean[] splatMap)
public static String encodeSplatmap(boolean[] splatmap)
public static boolean[] decodeSplatmap(String splatmapString)
public static boolean[] buildSplatMap(Operand[] args, boolean containsArgSplat)
public static final org.objectweb.asm.Type[] typesFromSignature(com.headius.invokebinder.Signature signature)
public static RubyString newFrozenStringFromRaw(Ruby runtime, String str, String encoding, int cr)
public static final org.jruby.util.ByteList newByteListFromRaw(Ruby runtime, String str, String encoding)
public static RubyEncoding retrieveEncoding(ThreadContext context, String name)
public static org.jcodings.Encoding retrieveJCodingsEncoding(ThreadContext context, String name)
public static RubyHash constructHashFromArray(Ruby runtime, IRubyObject[] pairs)
public static RubyHash dupKwargsHashAndPopulateFromArray(ThreadContext context, RubyHash dupHash, IRubyObject[] pairs)
public static IRubyObject searchConst(ThreadContext context, StaticScope staticScope, String constName, boolean noPrivateConsts)
public static IRubyObject inheritedSearchConst(ThreadContext context, IRubyObject cmVal, String constName, boolean noPrivateConsts)
public static IRubyObject lexicalSearchConst(ThreadContext context, StaticScope staticScope, String constName)
public static IRubyObject setInstanceVariable(IRubyObject self, IRubyObject value, String name)
public static DynamicMethod newInterpretedMetaClass(Ruby runtime, IRScope metaClassBody, IRubyObject obj)
public static DynamicMethod newCompiledMetaClass(ThreadContext context, java.lang.invoke.MethodHandle handle, IRScope metaClassBody, IRubyObject obj)
public static DynamicMethod newInterpretedModuleBody(ThreadContext context, IRScope irModule, Object rubyContainer)
public static DynamicMethod newCompiledModuleBody(ThreadContext context, java.lang.invoke.MethodHandle handle, IRScope irModule, Object rubyContainer)
public static DynamicMethod newInterpretedClassBody(ThreadContext context, IRScope irClassBody, Object container, Object superClass)
public static DynamicMethod newCompiledClassBody(ThreadContext context, java.lang.invoke.MethodHandle handle, IRScope irClassBody, Object container, Object superClass)
public static RubyModule newRubyClassFromIR(Ruby runtime, IRScope irClassBody, Object superClass, Object container)
public static void defInterpretedClassMethod(ThreadContext context, IRScope method, IRubyObject obj)
public static void defCompiledClassMethod(ThreadContext context, java.lang.invoke.MethodHandle handle, IRScope method, IRubyObject obj)
public static void defCompiledClassMethod(ThreadContext context, java.lang.invoke.MethodHandle variable, java.lang.invoke.MethodHandle specific, int specificArity, IRScope method, IRubyObject obj)
public static void defInterpretedInstanceMethod(ThreadContext context, IRScope method, DynamicScope currDynScope, IRubyObject self)
public static void defCompiledInstanceMethod(ThreadContext context, java.lang.invoke.MethodHandle handle, IRScope method, DynamicScope currDynScope, IRubyObject self)
public static void defCompiledInstanceMethod(ThreadContext context, java.lang.invoke.MethodHandle variable, java.lang.invoke.MethodHandle specific, int specificArity, IRScope method, DynamicScope currDynScope, IRubyObject self)
public static IRubyObject invokeModuleBody(ThreadContext context, DynamicMethod method, Block block)
public static RubyRegexp newDynamicRegexp(ThreadContext context, IRubyObject[] pieces, int embeddedOptions)
public static RubyRegexp newLiteralRegexp(ThreadContext context, org.jruby.util.ByteList source, RegexpOptions options)
public static RubyRegexp newLiteralRegexp(ThreadContext context, org.jruby.util.ByteList source, int embeddedOptions)
public static RubyArray irSplat(ThreadContext context, IRubyObject ary)
public static IRubyObject irToAry(ThreadContext context, IRubyObject value)
public static int irReqdArgMultipleAsgnIndex(int n, int preArgsCount, int index, int postArgsCount)
public static IRubyObject irReqdArgMultipleAsgn(ThreadContext context, RubyArray rubyArray, int preArgsCount, int index, int postArgsCount)
public static IRubyObject irNot(ThreadContext context, IRubyObject obj)
public static RaiseException newRequiredKeywordArgumentError(ThreadContext context, String name)
public static void pushExitBlock(ThreadContext context, Block blk)
public static FunctionalCachingCallSite newFunctionalCachingCallSite(String name)
public static NormalCachingCallSite newNormalCachingCallSite(String name)
public static VariableCachingCallSite newVariableCachingCallSite(String name)
public static RefinedCachingCallSite newRefinedCachingCallSite(String name, String callType)
public static IRScope decodeScopeFromBytes(Ruby runtime, byte[] scopeBytes, String filename)
public static VariableAccessor getVariableAccessorForRead(IRubyObject object, String name)
public static VariableAccessor getVariableAccessorForWrite(IRubyObject object, String name)
public static IRubyObject getVariableWithAccessor(IRubyObject self, VariableAccessor accessor, ThreadContext context, String name)
public static void setVariableWithAccessor(IRubyObject self, IRubyObject value, VariableAccessor accessor)
Copyright © 2001-2015 JRuby. All Rights Reserved.