Package org.jruby.runtime.callsite
Class CachingCallSite
java.lang.Object
org.jruby.runtime.CallSite
org.jruby.runtime.callsite.CachingCallSite
- Direct Known Subclasses:
CmpCallSite
,DivCallSite
,EqCallSite
,FunctionalCachingCallSite
,GeCallSite
,GtCallSite
,LeCallSite
,LtCallSite
,MinusCallSite
,ModCallSite
,MonomorphicCallSite
,MulCallSite
,NormalCachingCallSite
,NotEqCallSite
,PlusCallSite
,ProfilingCachingCallSite
,RefinedCachingCallSite
,VariableCachingCallSite
-
Field Summary
FieldsFields inherited from class org.jruby.runtime.CallSite
callType, methodName
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType) protected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, Block block) protected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, Block block, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) protected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg) protected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject[] args) protected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject[] args, Block block) protected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg, Block block) protected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg1, IRubyObject arg2) protected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg1, IRubyObject arg2, Block block) protected IRubyObject
cacheAndCall
(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) call
(ThreadContext context, IRubyObject caller, IRubyObject self) Call the site's method against the target object passing no args.call
(ThreadContext context, IRubyObject caller, IRubyObject self, double flote) Call the site's method against the target object, passing a literal double value.call
(ThreadContext context, IRubyObject caller, IRubyObject self, long fixnum) Call the site's method against the target object, passing a literal long value.call
(ThreadContext context, IRubyObject caller, IRubyObject self, Block block) Call the site's method against the target object passing no arguments and a non-literal (block pass, &) block.call
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1) Call the site's method against the target object passing one argument.call
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) Call the site's method against the target object passing arguments.call
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) Call the site's method against the target object passing one argument and a non-literal (block pass, &) block.call
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, Block block) Call the site's method against the target object passing one argument and a non-literal (block pass, &) block.call
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2) Call the site's method against the target object passing two arguments.call
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, Block block) Call the site's method against the target object passing two arguments and a non-literal (block pass, &) block.call
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) Call the site's method against the target object passing two arguments.call
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) Call the site's method against the target object passing three arguments and a non-literal (block pass, &) block.final IRubyObject
callIter
(ThreadContext context, IRubyObject caller, IRubyObject self, Block block) Call the site's method against the target object passing no arguments and a literal block.callIter
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) Call the site's method against the target object passing arguments and a literal block.callIter
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, Block block) Call the site's method against the target object passing one argument and a literal block.final IRubyObject
callIter
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, Block block) Call the site's method against the target object passing two arguments and a literal block.final IRubyObject
callIter
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) Call the site's method against the target object passing three arguments and a literal block.final IRubyObject
callVarargs
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) Call the site's method against the target object passing arguments.final IRubyObject
callVarargs
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) Call the site's method against the target object passing one argument and a non-literal (block pass, &) block.final IRubyObject
callVarargsIter
(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) Call the site's method against the target object passing arguments and a literal block.fcall
(ThreadContext context, IRubyObject self) fcall
(ThreadContext context, IRubyObject self, Block block) fcall
(ThreadContext context, IRubyObject self, IRubyObject arg1) fcall
(ThreadContext context, IRubyObject self, IRubyObject... args) fcall
(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) fcall
(ThreadContext context, IRubyObject self, IRubyObject arg1, Block block) fcall
(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2) fcall
(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, Block block) fcall
(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) fcall
(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) final IRubyObject
fcallIter
(ThreadContext context, IRubyObject self, Block block) fcallIter
(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) fcallIter
(ThreadContext context, IRubyObject self, IRubyObject arg1, Block block) final IRubyObject
fcallIter
(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, Block block) final IRubyObject
fcallIter
(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) final IRubyObject
fcallVarargs
(ThreadContext context, IRubyObject self, IRubyObject... args) final IRubyObject
fcallVarargs
(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) final IRubyObject
fcallVarargsIter
(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) final CacheEntry
getCache()
final int
final long
protected static RubyClass
getClass
(IRubyObject self) final String
final boolean
boolean
isBuiltin
(IRubyObject self) final boolean
protected boolean
methodMissing
(DynamicMethod method, IRubyObject caller) final CacheEntry
retrieveCache
(RubyClass selfType) final CacheEntry
retrieveCache
(RubyClass selfType, String methodName) Deprecated.final CacheEntry
retrieveCache
(IRubyObject self) protected CacheEntry
setCache
(CacheEntry entry, IRubyObject self)
-
Field Details
-
cache
-
builtinCache
Deprecated.
-
-
Constructor Details
-
CachingCallSite
-
-
Method Details
-
getCache
-
setCache
-
isOptimizable
public final boolean isOptimizable() -
getCachedClassIndex
public final int getCachedClassIndex() -
getMethodName
-
getCachedMethodSerial
public final long getCachedMethodSerial() -
call
Description copied from class:CallSite
Call the site's method against the target object, passing a literal long value. -
call
Description copied from class:CallSite
Call the site's method against the target object, passing a literal double value. -
call
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) Description copied from class:CallSite
Call the site's method against the target object passing arguments. -
fcall
-
call
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) Description copied from class:CallSite
Call the site's method against the target object passing one argument and a non-literal (block pass, &) block. -
fcall
-
callIter
public IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) Description copied from class:CallSite
Call the site's method against the target object passing arguments and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so. -
fcallIter
public IRubyObject fcallIter(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) -
callVarargs
public final IRubyObject callVarargs(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject... args) Description copied from class:CallSite
Call the site's method against the target object passing arguments. As a "varargs" method, this will use the length of the args array to dispatch to the correct arity call, rather than dispatching unconditionally to the IRubyObject[] path.- Specified by:
callVarargs
in classCallSite
- Parameters:
context
- the ThreadContext for the current threadcaller
- the caller, for visibility checksself
- the target object to call againstargs
- the arguments to pass- Returns:
- the result of the call
-
fcallVarargs
-
callVarargs
public final IRubyObject callVarargs(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) Description copied from class:CallSite
Call the site's method against the target object passing one argument and a non-literal (block pass, &) block. As a "varargs" method, this will use the length of the args array to dispatch to the correct arity call, rather than dispatching unconditionally to the IRubyObject[] path.- Specified by:
callVarargs
in classCallSite
- Parameters:
context
- the ThreadContext for the current threadcaller
- the caller, for visibility checksself
- the target object to call againstargs
- the arguments to passblock
- the block argument to pass- Returns:
- the result of the call
-
fcallVarargs
public final IRubyObject fcallVarargs(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) -
callVarargsIter
public final IRubyObject callVarargsIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject[] args, Block block) Description copied from class:CallSite
Call the site's method against the target object passing arguments and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so. As a "varargs" method, this will use the length of the args array to dispatch to the correct arity call, rather than dispatching unconditionally to the IRubyObject[] path.- Specified by:
callVarargsIter
in classCallSite
- Parameters:
context
- the ThreadContext for the current threadcaller
- the caller, for visibility checksself
- the target object to call againstargs
- the arguments to passblock
- the literal block to pass- Returns:
- the result of the call
-
fcallVarargsIter
public final IRubyObject fcallVarargsIter(ThreadContext context, IRubyObject self, IRubyObject[] args, Block block) -
call
Description copied from class:CallSite
Call the site's method against the target object passing no args. -
fcall
-
call
Description copied from class:CallSite
Call the site's method against the target object passing no arguments and a non-literal (block pass, &) block. -
fcall
-
callIter
public final IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, Block block) Description copied from class:CallSite
Call the site's method against the target object passing no arguments and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so. -
fcallIter
-
call
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1) Description copied from class:CallSite
Call the site's method against the target object passing one argument. -
fcall
-
call
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, Block block) Description copied from class:CallSite
Call the site's method against the target object passing one argument and a non-literal (block pass, &) block. -
fcall
-
callIter
public IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, Block block) Description copied from class:CallSite
Call the site's method against the target object passing one argument and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so. -
fcallIter
public IRubyObject fcallIter(ThreadContext context, IRubyObject self, IRubyObject arg1, Block block) -
call
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2) Description copied from class:CallSite
Call the site's method against the target object passing two arguments. -
fcall
public IRubyObject fcall(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2) -
call
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, Block block) Description copied from class:CallSite
Call the site's method against the target object passing two arguments and a non-literal (block pass, &) block.- Specified by:
call
in classCallSite
- Parameters:
context
- the ThreadContext for the current threadcaller
- the caller, for visibility checksself
- the target object to call againstarg1
- the first argument to passarg2
- the second argument to passblock
- the block argument to pass- Returns:
- the result of the call
-
fcall
public IRubyObject fcall(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, Block block) -
callIter
public final IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, Block block) Description copied from class:CallSite
Call the site's method against the target object passing two arguments and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so.- Specified by:
callIter
in classCallSite
- Parameters:
context
- the ThreadContext for the current threadcaller
- the caller, for visibility checksself
- the target object to call againstarg1
- the first argument to passarg2
- the second argument to passblock
- the literal block to pass- Returns:
- the result of the call
-
fcallIter
public final IRubyObject fcallIter(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, Block block) -
call
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) Description copied from class:CallSite
Call the site's method against the target object passing two arguments.- Specified by:
call
in classCallSite
- Parameters:
context
- the ThreadContext for the current threadcaller
- the caller, for visibility checksself
- the target object to call againstarg1
- the first argument to passarg2
- the second argument to passarg3
- the third argument to pass- Returns:
- the result of the call
-
fcall
public IRubyObject fcall(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) -
call
public IRubyObject call(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) Description copied from class:CallSite
Call the site's method against the target object passing three arguments and a non-literal (block pass, &) block.- Specified by:
call
in classCallSite
- Parameters:
context
- the ThreadContext for the current threadcaller
- the caller, for visibility checksself
- the target object to call againstarg1
- the first argument to passarg2
- the second argument to passarg3
- the third argument to passblock
- the block argument to pass- Returns:
- the result of the call
-
fcall
public IRubyObject fcall(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) -
callIter
public final IRubyObject callIter(ThreadContext context, IRubyObject caller, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) Description copied from class:CallSite
Call the site's method against the target object passing three arguments and a literal block. This version handles break jumps by returning their value if this is the appropriate place in the call stack to do so.- Specified by:
callIter
in classCallSite
- Parameters:
context
- the ThreadContext for the current threadcaller
- the caller, for visibility checksself
- the target object to call againstarg1
- the first argument to passarg2
- the second argument to passarg3
- the third argument to passblock
- the literal block to pass- Returns:
- the result of the call
-
fcallIter
public final IRubyObject fcallIter(ThreadContext context, IRubyObject self, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3, Block block) -
retrieveCache
-
retrieveCache
-
retrieveCache
Deprecated. -
isBuiltin
-
isBuiltin
-
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject[] args, Block block) -
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject[] args) -
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType) -
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, Block block) -
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg) -
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg, Block block) -
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg1, IRubyObject arg2) -
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg1, IRubyObject arg2, Block block) -
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) -
cacheAndCall
protected IRubyObject cacheAndCall(ThreadContext context, IRubyObject caller, IRubyObject self, RubyClass selfType, Block block, IRubyObject arg1, IRubyObject arg2, IRubyObject arg3) -
methodMissing
-
getClass
-