public class NormalInvocationCompiler extends java.lang.Object implements InvocationCompiler
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
SUPER_NOSPLAT_RESOLVED |
static java.lang.String |
SUPER_NOSPLAT_UNRESOLVED |
static java.lang.String |
SUPER_SPLAT_RESOLVED |
static java.lang.String |
SUPER_SPLAT_UNRESOLVED |
| Constructor and Description |
|---|
NormalInvocationCompiler(IRBytecodeAdapter compiler) |
| Modifier and Type | Method and Description |
|---|---|
void |
invoke(java.lang.String file,
int lineNumber,
java.lang.String scopeFieldName,
CallBase call,
int arity) |
void |
invokeArrayDeref(java.lang.String file,
java.lang.String scopeFieldName,
CallBase call)
Invoke the array dereferencing method ([]) on an object other than self.
|
void |
invokeClassSuper(java.lang.String file,
java.lang.String name,
int arity,
boolean hasClosure,
boolean literalClosure,
boolean[] splatmap)
Invoke a superclass method from a class context.
|
void |
invokeEQQ(EQQInstr call)
Perform a === call appropriate for a case/when statement.
|
void |
invokeInstanceSuper(java.lang.String file,
java.lang.String name,
int arity,
boolean hasClosure,
boolean literalClosure,
boolean[] splatmap)
Invoke a superclass method from an instance context.
|
void |
invokeOther(java.lang.String file,
java.lang.String scopeFieldName,
CallBase call,
int arity)
Invoke a method on an object other than self.
|
void |
invokeOtherOneFixnum(java.lang.String file,
CallBase call,
long fixnum)
Invoke a fixnum-receiving method on an object other than self.
|
void |
invokeOtherOneFloat(java.lang.String file,
CallBase call,
double flote)
Invoke a float-receiving method on an object other than self.
|
void |
invokeSelf(java.lang.String file,
java.lang.String scopeFieldName,
CallBase call,
int arity)
Invoke a method on self.
|
void |
invokeUnresolvedSuper(java.lang.String file,
java.lang.String name,
int arity,
boolean hasClosure,
boolean literalClosure,
boolean[] splatmap)
Invoke a superclass method from an unresolved context.
|
void |
invokeZSuper(java.lang.String file,
java.lang.String name,
int arity,
boolean hasClosure,
boolean[] splatmap)
Invoke a superclass method from a zsuper in a block.
|
public static final java.lang.String SUPER_SPLAT_UNRESOLVED
public static final java.lang.String SUPER_NOSPLAT_UNRESOLVED
public static final java.lang.String SUPER_SPLAT_RESOLVED
public static final java.lang.String SUPER_NOSPLAT_RESOLVED
public NormalInvocationCompiler(IRBytecodeAdapter compiler)
public void invokeOther(java.lang.String file,
java.lang.String scopeFieldName,
CallBase call,
int arity)
InvocationCompilerStack required: context, self, all arguments, optional block
invokeOther in interface InvocationCompilercall - the call to be invokedpublic void invokeArrayDeref(java.lang.String file,
java.lang.String scopeFieldName,
CallBase call)
InvocationCompilerIf this invokes against a Hash with a frozen string, it will follow an optimized path.
Stack required: context, self, target, arg0
invokeArrayDeref in interface InvocationCompilerpublic void invoke(java.lang.String file,
int lineNumber,
java.lang.String scopeFieldName,
CallBase call,
int arity)
public void invokeOtherOneFixnum(java.lang.String file,
CallBase call,
long fixnum)
InvocationCompilerStack required: context, self, receiver (fixnum will be handled separately)
invokeOtherOneFixnum in interface InvocationCompilerpublic void invokeOtherOneFloat(java.lang.String file,
CallBase call,
double flote)
InvocationCompilerStack required: context, self, receiver (float will be handled separately)
invokeOtherOneFloat in interface InvocationCompilerpublic void invokeSelf(java.lang.String file,
java.lang.String scopeFieldName,
CallBase call,
int arity)
InvocationCompilerinvokeSelf in interface InvocationCompilerfile - the filename of the script making this callcall - to be invoked on selfarity - of the call.public void invokeInstanceSuper(java.lang.String file,
java.lang.String name,
int arity,
boolean hasClosure,
boolean literalClosure,
boolean[] splatmap)
InvocationCompilerinvokeInstanceSuper in interface InvocationCompilerfile - the filename of the script making this callname - name of the method to invokearity - arity of the arguments on the stackhasClosure - whether a block is passedliteralClosure - whether the block passed is a literal closuresplatmap - a map of arguments to be splatted back into arg listpublic void invokeClassSuper(java.lang.String file,
java.lang.String name,
int arity,
boolean hasClosure,
boolean literalClosure,
boolean[] splatmap)
InvocationCompilerinvokeClassSuper in interface InvocationCompilerfile - the filename of the script making this callname - name of the method to invokearity - arity of the arguments on the stackhasClosure - whether a block is passedliteralClosure - whether the block passed is a literal closuresplatmap - a map of arguments to be splatted back into arg listpublic void invokeUnresolvedSuper(java.lang.String file,
java.lang.String name,
int arity,
boolean hasClosure,
boolean literalClosure,
boolean[] splatmap)
InvocationCompilerinvokeUnresolvedSuper in interface InvocationCompilerfile - the filename of the script making this callname - name of the method to invokearity - arity of the arguments on the stackhasClosure - whether a block is passedliteralClosure - whether the block passed is a literal closuresplatmap - a map of arguments to be splatted back into arg listpublic void invokeZSuper(java.lang.String file,
java.lang.String name,
int arity,
boolean hasClosure,
boolean[] splatmap)
InvocationCompilerinvokeZSuper in interface InvocationCompilerfile - the filename of the script making this callname - name of the method to invokearity - arity of the arguments on the stackhasClosure - whether a block is passedsplatmap - a map of arguments to be splatted back into arg listpublic void invokeEQQ(EQQInstr call)
InvocationCompilerinvokeEQQ in interface InvocationCompilerCopyright © 2001-2022 JRuby. All Rights Reserved.