Top Fields Constructors Methods
org.jruby.ir.targets.simple

public Class NormalInvocationCompiler

extends Object
implements InvocationCompiler
Class Inheritance
All Implemented Interfaces
org.jruby.ir.targets.InvocationCompiler
Imports
org.jruby.RubyClass, .RubyModule, .RubyString, org.jruby.compiler.NotCompilableException, org.jruby.compiler.impl.SkinnyMethodAdapter, org.jruby.ir.instructions.AsStringInstr, .CallBase, .EQQInstr, org.jruby.ir.runtime.IRRuntimeHelpers, org.jruby.ir.targets.IRBytecodeAdapter, .InvocationCompiler, .JVM, org.jruby.ir.targets.indy.IndyInvocationCompiler, org.jruby.runtime.Block, .CallSite, .CallType, .MethodIndex, .ThreadContext, org.jruby.runtime.builtin.IRubyObject, org.jruby.runtime.callsite.CachingCallSite, org.jruby.util.CodegenUtils, .JavaNameMangler, org.objectweb.asm.Label, .Opcodes, java.lang.invoke.MethodType

Field Summary

Modifier and TypeField and Description
private final IRBytecodeAdapter
public static final String
public static final String
public static final String
public static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
asString(AsStringInstr call, String scopeFieldName, String file)

Implements org.jruby.ir.targets.InvocationCompiler.asString.

Coerces the receiver to a String using to_s, unless it is already a String Stack required: context, caller, receiver

public void
invoke(String file, int lineNumber, String scopeFieldName, CallBase call, int arity)

public void
invokeArrayDeref(String file, String scopeFieldName, CallBase call)

Implements org.jruby.ir.targets.InvocationCompiler.invokeArrayDeref.

Invoke the array dereferencing method ([]) on an object other than self.

public void
public void
invokeClassSuper(String
the filename of the script making this call
file
,
String
name of the method to invoke
name
,
int
arity of the arguments on the stack
arity
,
boolean
whether a block is passed
hasClosure
,
boolean
whether the block passed is a literal closure
literalClosure
,
boolean[]
a map of arguments to be splatted back into arg list
splatmap
,
int flags)

Implements org.jruby.ir.targets.InvocationCompiler.invokeClassSuper.

Invoke a superclass method from a class context.

public void
invokeEQQ(EQQInstr call)

Implements org.jruby.ir.targets.InvocationCompiler.invokeEQQ.

Perform a === call appropriate for a case/when statement.

public void
invokeFrameName(String methodName, String file)

Implements org.jruby.ir.targets.InvocationCompiler.invokeFrameName.

Invoke __method__ or __callee__ with awareness of any built-in methods.

public void
invokeInstanceSuper(String
the filename of the script making this call
file
,
String
name of the method to invoke
name
,
int
arity of the arguments on the stack
arity
,
boolean
whether a block is passed
hasClosure
,
boolean
whether the block passed is a literal closure
literalClosure
,
boolean[]
a map of arguments to be splatted back into arg list
splatmap
,
int flags)

Implements org.jruby.ir.targets.InvocationCompiler.invokeInstanceSuper.

Invoke a superclass method from an instance context.

public void
invokeOther(String file, String scopeFieldName, CallBase
the call to be invoked
call
,
int arity)

Implements org.jruby.ir.targets.InvocationCompiler.invokeOther.

Invoke a method on an object other than self.

public void
invokeOtherOneFixnum(String file, CallBase call, long fixnum)

Implements org.jruby.ir.targets.InvocationCompiler.invokeOtherOneFixnum.

Invoke a fixnum-receiving method on an object other than self.

public void
invokeOtherOneFloat(String file, CallBase call, double flote)

Implements org.jruby.ir.targets.InvocationCompiler.invokeOtherOneFloat.

Invoke a float-receiving method on an object other than self.

public void
invokeSelf(String
the filename of the script making this call
file
,
String scopeFieldName, CallBase
to be invoked on self
call
,
int
of the call.
arity
)

Implements org.jruby.ir.targets.InvocationCompiler.invokeSelf.

Invoke a method on self.

public void
invokeUnresolvedSuper(String
the filename of the script making this call
file
,
String
name of the method to invoke
name
,
int
arity of the arguments on the stack
arity
,
boolean
whether a block is passed
hasClosure
,
boolean
whether the block passed is a literal closure
literalClosure
,
boolean[]
a map of arguments to be splatted back into arg list
splatmap
,
int flags)

Implements org.jruby.ir.targets.InvocationCompiler.invokeUnresolvedSuper.

Invoke a superclass method from an unresolved context.

public void
invokeZSuper(String
the filename of the script making this call
file
,
String
name of the method to invoke
name
,
int
arity of the arguments on the stack
arity
,
boolean
whether a block is passed
hasClosure
,
boolean[]
a map of arguments to be splatted back into arg list
splatmap
,
int flags)

Implements org.jruby.ir.targets.InvocationCompiler.invokeZSuper.

Invoke a superclass method from a zsuper in a block.

private void
performSuper(String file, int line, String name, int arity, boolean hasClosure, boolean[] splatmap, String superHelper, String splatHelper, boolean unresolved, int flags)

public void
setCallInfo(int flags)

Implements org.jruby.ir.targets.InvocationCompiler.setCallInfo.

Sets the current callInfo, when it cannot be passed other ways Stack required: none

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

compilerback to summary
private final IRBytecodeAdapter compiler
SUPER_NOSPLAT_RESOLVEDback to summary
public static final String SUPER_NOSPLAT_RESOLVED
SUPER_NOSPLAT_UNRESOLVEDback to summary
public static final String SUPER_NOSPLAT_UNRESOLVED
SUPER_SPLAT_RESOLVEDback to summary
public static final String SUPER_SPLAT_RESOLVED
SUPER_SPLAT_UNRESOLVEDback to summary
public static final String SUPER_SPLAT_UNRESOLVED

Constructor Detail

NormalInvocationCompilerback to summary
public NormalInvocationCompiler(IRBytecodeAdapter compiler)

Method Detail

asStringback to summary
public void asString(AsStringInstr call, String scopeFieldName, String file)

Implements org.jruby.ir.targets.InvocationCompiler.asString.

Doc from org.jruby.ir.targets.InvocationCompiler.asString.

Coerces the receiver to a String using to_s, unless it is already a String Stack required: context, caller, receiver

Annotations
@Override
invokeback to summary
public void invoke(String file, int lineNumber, String scopeFieldName, CallBase call, int arity)
invokeArrayDerefback to summary
public void invokeArrayDeref(String file, String scopeFieldName, CallBase call)

Implements org.jruby.ir.targets.InvocationCompiler.invokeArrayDeref.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeArrayDeref.

Invoke the array dereferencing method ([]) on an object other than self.

If this invokes against a Hash with a frozen string, it will follow an optimized path.

Stack required: context, self, target, arg0

Annotations
@Override
invokeBlockGivenback to summary
public void invokeBlockGiven(String methodName, String file)

Implements org.jruby.ir.targets.InvocationCompiler.invokeBlockGiven.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeBlockGiven.

Invoke block_given? or iterator? with awareness of any built-in methods.

Annotations
@Override
invokeClassSuperback to summary
public void invokeClassSuper(String file, String name, int arity, boolean hasClosure, boolean literalClosure, boolean[] splatmap, int flags)

Implements org.jruby.ir.targets.InvocationCompiler.invokeClassSuper.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeClassSuper.

Invoke a superclass method from a class context.

Stack required: context, caller, self, start class, arguments[, block]

Parameters
file:String

the filename of the script making this call

name:String

name of the method to invoke

arity:int

arity of the arguments on the stack

hasClosure:boolean

whether a block is passed

literalClosure:boolean

whether the block passed is a literal closure

splatmap:boolean[]

a map of arguments to be splatted back into arg list

invokeEQQback to summary
public void invokeEQQ(EQQInstr call)

Implements org.jruby.ir.targets.InvocationCompiler.invokeEQQ.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeEQQ.

Perform a === call appropriate for a case/when statement. Stack required: context, case value, when value

Annotations
@Override
invokeFrameNameback to summary
public void invokeFrameName(String methodName, String file)

Implements org.jruby.ir.targets.InvocationCompiler.invokeFrameName.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeFrameName.

Invoke __method__ or __callee__ with awareness of any built-in methods.

Annotations
@Override
invokeInstanceSuperback to summary
public void invokeInstanceSuper(String file, String name, int arity, boolean hasClosure, boolean literalClosure, boolean[] splatmap, int flags)

Implements org.jruby.ir.targets.InvocationCompiler.invokeInstanceSuper.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeInstanceSuper.

Invoke a superclass method from an instance context.

Stack required: context, caller, self, start class, arguments[, block]

Parameters
file:String

the filename of the script making this call

name:String

name of the method to invoke

arity:int

arity of the arguments on the stack

hasClosure:boolean

whether a block is passed

literalClosure:boolean

whether the block passed is a literal closure

splatmap:boolean[]

a map of arguments to be splatted back into arg list

invokeOtherback to summary
public void invokeOther(String file, String scopeFieldName, CallBase call, int arity)

Implements org.jruby.ir.targets.InvocationCompiler.invokeOther.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeOther.

Invoke a method on an object other than self.

Stack required: context, self, all arguments, optional block

Parameters
call:CallBase

the call to be invoked

Annotations
@Override
invokeOtherOneFixnumback to summary
public void invokeOtherOneFixnum(String file, CallBase call, long fixnum)

Implements org.jruby.ir.targets.InvocationCompiler.invokeOtherOneFixnum.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeOtherOneFixnum.

Invoke a fixnum-receiving method on an object other than self.

Stack required: context, self, receiver (fixnum will be handled separately)

Annotations
@Override
invokeOtherOneFloatback to summary
public void invokeOtherOneFloat(String file, CallBase call, double flote)

Implements org.jruby.ir.targets.InvocationCompiler.invokeOtherOneFloat.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeOtherOneFloat.

Invoke a float-receiving method on an object other than self.

Stack required: context, self, receiver (float will be handled separately)

Annotations
@Override
invokeSelfback to summary
public void invokeSelf(String file, String scopeFieldName, CallBase call, int arity)

Implements org.jruby.ir.targets.InvocationCompiler.invokeSelf.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeSelf.

Invoke a method on self. Stack required: context, caller, self, all arguments, optional block

Parameters
file:String

the filename of the script making this call

call:CallBase

to be invoked on self

arity:int

of the call.

invokeUnresolvedSuperback to summary
public void invokeUnresolvedSuper(String file, String name, int arity, boolean hasClosure, boolean literalClosure, boolean[] splatmap, int flags)

Implements org.jruby.ir.targets.InvocationCompiler.invokeUnresolvedSuper.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeUnresolvedSuper.

Invoke a superclass method from an unresolved context.

Stack required: context, caller, self, arguments[, block]

Parameters
file:String

the filename of the script making this call

name:String

name of the method to invoke

arity:int

arity of the arguments on the stack

hasClosure:boolean

whether a block is passed

literalClosure:boolean

whether the block passed is a literal closure

splatmap:boolean[]

a map of arguments to be splatted back into arg list

invokeZSuperback to summary
public void invokeZSuper(String file, String name, int arity, boolean hasClosure, boolean[] splatmap, int flags)

Implements org.jruby.ir.targets.InvocationCompiler.invokeZSuper.

Doc from org.jruby.ir.targets.InvocationCompiler.invokeZSuper.

Invoke a superclass method from a zsuper in a block.

Stack required: context, caller, self, arguments[, block]

Parameters
file:String

the filename of the script making this call

name:String

name of the method to invoke

arity:int

arity of the arguments on the stack

hasClosure:boolean

whether a block is passed

splatmap:boolean[]

a map of arguments to be splatted back into arg list

performSuperback to summary
private void performSuper(String file, int line, String name, int arity, boolean hasClosure, boolean[] splatmap, String superHelper, String splatHelper, boolean unresolved, int flags)
setCallInfoback to summary
public void setCallInfo(int flags)

Implements org.jruby.ir.targets.InvocationCompiler.setCallInfo.

Doc from org.jruby.ir.targets.InvocationCompiler.setCallInfo.

Sets the current callInfo, when it cannot be passed other ways Stack required: none

Annotations
@Override