public class CompiledIRMethod extends DynamicMethod implements PositionAware
DynamicMethod.NativeCall| Modifier and Type | Field and Description |
|---|---|
private Arity |
arity |
(package private) boolean |
displayedCFG |
private java.lang.String |
file |
private int |
line |
private static Logger |
LOG |
private java.lang.invoke.MethodHandle |
method |
private java.lang.String |
name |
private StaticScope |
scope |
builtin, callConfig, handle, implementationClass, nativeCall, nativeCalls, notImplemented, protectedClass, serialNumber, visibility| Constructor and Description |
|---|
CompiledIRMethod(java.lang.invoke.MethodHandle method,
java.lang.String name,
java.lang.String file,
int line,
StaticScope scope,
Visibility visibility,
RubyModule implementationClass) |
| Modifier and Type | Method and Description |
|---|---|
private Arity |
calculateArity() |
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
Block block)
Arity 0, with block; calls through IRubyObject[] path
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject[] args,
Block block)
The minimum 'call' method required for a dynamic method handle.
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject arg0,
Block block)
Arity 1, with block; calls through IRubyObject[] path
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject arg0,
IRubyObject arg1,
Block block)
Arity 2, with block; calls through IRubyObject[] path
|
IRubyObject |
call(ThreadContext context,
IRubyObject self,
RubyModule clazz,
java.lang.String name,
IRubyObject arg0,
IRubyObject arg1,
IRubyObject arg2,
Block block)
Arity 3, with block; calls through IRubyObject[] path
|
DynamicMethod |
dup()
Duplicate this method, returning DynamicMethod referencing the same code
and with the same attributes.
|
Arity |
getArity()
Retrieve the arity of this method, used for reporting arity to Ruby
code.
|
java.lang.String |
getFile()
Get the filename for the method.
|
int |
getLine()
Get the line number for the method.
|
StaticScope |
getStaticScope() |
calculateProtectedClass, call, call, call, call, call, getCallConfig, getHandle, getImplementationClass, getMethodData, getName, getNativeCall, getNativeCall, getProtectedClass, getRealMethod, getSerialNumber, getVisibility, handleBreak, handleRedo, handleReturn, init, isBuiltin, isCallableFrom, isNative, isNotImplemented, isUndefined, setCallConfig, setHandle, setImplementationClass, setIsBuiltin, setName, setNativeCall, setNativeCall, setNativeCall, setNotImplemented, setVisibilityprivate static final Logger LOG
private final java.lang.invoke.MethodHandle method
private final java.lang.String name
private final java.lang.String file
private final int line
private final StaticScope scope
private Arity arity
boolean displayedCFG
public CompiledIRMethod(java.lang.invoke.MethodHandle method,
java.lang.String name,
java.lang.String file,
int line,
StaticScope scope,
Visibility visibility,
RubyModule implementationClass)
private Arity calculateArity()
public Arity getArity()
DynamicMethodgetArity in class DynamicMethodpublic IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject[] args, Block block)
DynamicMethodcall in class DynamicMethodcontext - The thread context for the currently executing threadself - The 'self' or 'receiver' object to use for this callname - The incoming name used to invoke this methodargs - The argument list to this invocationblock - The block passed to this invocationpublic IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, Block block)
DynamicMethodcall in class DynamicMethodpublic IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject arg0, Block block)
DynamicMethodcall in class DynamicMethodpublic IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject arg0, IRubyObject arg1, Block block)
DynamicMethodcall in class DynamicMethodpublic IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, java.lang.String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)
DynamicMethodcall in class DynamicMethodpublic DynamicMethod dup()
DynamicMethoddup in class DynamicMethodpublic java.lang.String getFile()
PositionAwaregetFile in interface PositionAwarepublic int getLine()
PositionAwaregetLine in interface PositionAwarepublic StaticScope getStaticScope()