Top Fields Constructors Methods
org.jruby.internal.runtime.methods

public Class CompiledIRMethod

extends AbstractIRMethod
implements Compilable<DynamicMethod>
Class Inheritance
All Implemented Interfaces
org.jruby.compiler.Compilable
Imports
java.lang.invoke.MethodHandle, org.jruby.RubyModule, org.jruby.compiler.Compilable, org.jruby.internal.runtime.AbstractIRMethod, .SplitSuperState, org.jruby.ir.IRFlags, .IRMethod, .IRScope, org.jruby.ir.interpreter.ExitableInterpreterContext, .InterpreterContext, org.jruby.parser.StaticScope, org.jruby.runtime.ArgumentDescriptor, .Block, .DynamicScope, .Helpers, .ThreadContext, .Visibility, org.jruby.runtime.builtin.IRubyObject

Field Summary

Modifier and TypeField and Description
private final String
private final boolean
private MethodHandle
private final int
Inherited from org.jruby.internal.runtime.AbstractIRMethod:
callCountinterpreterContextlinemethodsignaturestaticScope

Constructor Summary

AccessConstructor and Description
public
CompiledIRMethod(MethodHandle variable, String id, int line, StaticScope scope, Visibility visibility, RubyModule implementationClass, String encodedArgumentDescriptors, boolean recievesKeywordArgs, boolean needsToFindImplementer)

public
CompiledIRMethod(MethodHandle variable, IRScope method, Visibility visibility, RubyModule implementationClass, String encodedArgumentDescriptors)

public
CompiledIRMethod(MethodHandle variable, MethodHandle specific, int specificArity, IRScope method, Visibility visibility, RubyModule implementationClass, String encodedArgumentDescriptors)

public
CompiledIRMethod(MethodHandle variable, String id, int line, StaticScope scope, Visibility visibility, RubyModule implementationClass)

public
CompiledIRMethod(MethodHandle variable, MethodHandle specific, int specificArity, String id, int line, StaticScope scope, Visibility visibility, RubyModule implementationClass, String encodedArgumentDescriptors, boolean receivesKeywordArgs, boolean needsToFindImplementer)

Method Summary

Modifier and TypeMethod and Description
public IRubyObject
call(ThreadContext
The thread context for the currently executing thread
context
,
IRubyObject
The 'self' or 'receiver' object to use for this call
self
,
RubyModule
The Ruby class against which this method is binding
clazz
,
String
The incoming name used to invoke this method
name
,
IRubyObject[]
The argument list to this invocation
args
,
Block
The block passed to this invocation
block
)

Implements abstract org.jruby.internal.runtime.methods.DynamicMethod.call.

The minimum 'call' method required for a dynamic method handle.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
call(ThreadContext
The thread context for the currently executing thread
context
,
IRubyObject
The 'self' or 'receiver' object to use for this call
self
,
RubyModule
The Ruby class against which this method is binding
clazz
,
String
The incoming name used to invoke this method
name
,
IRubyObject[]
The first argument to this invocation
args
)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

A default implementation of n-arity, non-block 'call' method, which simply calls the n-arity, block-receiving version with the arg list and Block.NULL_BLOCK.

public IRubyObject
public IRubyObject
public IRubyObject
public IRubyObject
public void
public void
public ArgumentDescriptor[]
getArgumentDescriptors()

Overrides org.jruby.internal.runtime.AbstractIRMethod.getArgumentDescriptors.

Implements org.jruby.internal.runtime.methods.IRMethodArgs.getArgumentDescriptors.

Get the array of ArgumentDescriptors that represent the arguments to this method.

public MethodHandle
getHandleFor(int arity)

private ExitableReturn
public boolean
protected void
protected void
preSplit(InterpreterContext ic, ThreadContext context, IRubyObject self, String name, Block block, RubyModule implClass, DynamicScope scope)

protected void
public void
public void
public SplitSuperState<MethodSplitState>
Inherited from org.jruby.internal.runtime.AbstractIRMethod:
buildclonedupensureInstrsReadygetAritygetFilegetInstanceVariableNamesgetIRScopegetLinegetMethodDatagetRuby2KeywordsgetSignaturegetStaticScopeisBuildCompletesetCallCountsetRuby2KeywordstoStringtryJit

Field Detail

encodedArgumentDescriptorsback to summary
private final String encodedArgumentDescriptors
needsToFindImplementerback to summary
private final boolean needsToFindImplementer
specificback to summary
private MethodHandle specific
specificArityback to summary
private final int specificArity

Constructor Detail

CompiledIRMethodback to summary
public CompiledIRMethod(MethodHandle variable, String id, int line, StaticScope scope, Visibility visibility, RubyModule implementationClass, String encodedArgumentDescriptors, boolean recievesKeywordArgs, boolean needsToFindImplementer)
CompiledIRMethodback to summary
public CompiledIRMethod(MethodHandle variable, IRScope method, Visibility visibility, RubyModule implementationClass, String encodedArgumentDescriptors)
CompiledIRMethodback to summary
public CompiledIRMethod(MethodHandle variable, MethodHandle specific, int specificArity, IRScope method, Visibility visibility, RubyModule implementationClass, String encodedArgumentDescriptors)
CompiledIRMethodback to summary
public CompiledIRMethod(MethodHandle variable, String id, int line, StaticScope scope, Visibility visibility, RubyModule implementationClass)
CompiledIRMethodback to summary
public CompiledIRMethod(MethodHandle variable, MethodHandle specific, int specificArity, String id, int line, StaticScope scope, Visibility visibility, RubyModule implementationClass, String encodedArgumentDescriptors, boolean receivesKeywordArgs, boolean needsToFindImplementer)

Method Detail

callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block)

Implements abstract org.jruby.internal.runtime.methods.DynamicMethod.call.

Doc from org.jruby.internal.runtime.methods.DynamicMethod.call.

The minimum 'call' method required for a dynamic method handle. Subclasses must implement this method, but may implement the other signatures to provide faster, non-boxing call paths. Typically subclasses will implement this method to check variable arity calls, then performing a specific-arity invocation to the appropriate method or performing variable-arity logic in-line.

Parameters
context:ThreadContext

The thread context for the currently executing thread

self:IRubyObject

The 'self' or 'receiver' object to use for this call

clazz:RubyModule

The Ruby class against which this method is binding

name:String

The incoming name used to invoke this method

args:IRubyObject[]

The argument list to this invocation

block:Block

The block passed to this invocation

Returns:IRubyObject

The result of the call

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, Block block)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, Block block)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, Block block)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2, Block block)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Doc from org.jruby.internal.runtime.methods.DynamicMethod.call.

A default implementation of n-arity, non-block 'call' method, which simply calls the n-arity, block-receiving version with the arg list and Block.NULL_BLOCK.

Parameters
context:ThreadContext

The thread context for the currently executing thread

self:IRubyObject

The 'self' or 'receiver' object to use for this call

clazz:RubyModule

The Ruby class against which this method is binding

name:String

The incoming name used to invoke this method

args:IRubyObject[]

The first argument to this invocation

Returns:IRubyObject

The result of the call

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
callback to summary
public IRubyObject call(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject arg0, IRubyObject arg1, IRubyObject arg2)

Overrides org.jruby.internal.runtime.methods.DynamicMethod.call.

Annotations
@Override
completeBuildback to summary
public void completeBuild(ThreadContext context, DynamicMethod buildResult)

Overrides default org.jruby.compiler.Compilable.completeBuild.

Annotations
@Override
finishSplitCallback to summary
public void finishSplitCall(SplitSuperState<T extends InternalSplitState> state)

Implements abstract org.jruby.internal.runtime.AbstractIRMethod.finishSplitCall.

Annotations
@Override
getArgumentDescriptorsback to summary
public ArgumentDescriptor[] getArgumentDescriptors()

Overrides org.jruby.internal.runtime.AbstractIRMethod.getArgumentDescriptors.

Implements org.jruby.internal.runtime.methods.IRMethodArgs.getArgumentDescriptors.

Doc from org.jruby.internal.runtime.methods.IRMethodArgs.getArgumentDescriptors.

Get the array of ArgumentDescriptors that represent the arguments to this method.

Returns:ArgumentDescriptor[]

this methods argument descriptors

getHandleForback to summary
public MethodHandle getHandleFor(int arity)
INTERPRET_METHODback to summary
private ExitableReturn INTERPRET_METHOD(MethodSplitState state, IRubyObject[] args, Block block)
needsToFindImplementerback to summary
public boolean needsToFindImplementer()

Overrides org.jruby.internal.runtime.AbstractIRMethod.needsToFindImplementer.

postback to summary
protected void post(InterpreterContext ic, ThreadContext context)
preSplitback to summary
protected void preSplit(InterpreterContext ic, ThreadContext context, IRubyObject self, String name, Block block, RubyModule implClass, DynamicScope scope)
printMethodIRback to summary
protected void printMethodIR()

Implements abstract org.jruby.internal.runtime.AbstractIRMethod.printMethodIR.

Annotations
@Override
setSpecificback to summary
public void setSpecific(MethodHandle specific)
setVariableback to summary
public void setVariable(MethodHandle variable)
startSplitSuperCallback to summary
public SplitSuperState<MethodSplitState> startSplitSuperCall(ThreadContext context, IRubyObject self, RubyModule clazz, String name, IRubyObject[] args, Block block)

Implements abstract org.jruby.internal.runtime.AbstractIRMethod.startSplitSuperCall.

Annotations
@Override