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 |
asString(AsStringInstr call,
java.lang.String scopeFieldName,
java.lang.String file)
Coerces the receiver to a String using to_s, unless it is already a String
Stack required: context, caller, receiver
|
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,
int flags)
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,
int flags)
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,
int flags)
Invoke a superclass method from an unresolved context.
|
void |
invokeZSuper(java.lang.String file,
java.lang.String name,
int arity,
boolean hasClosure,
boolean[] splatmap,
int flags)
Invoke a superclass method from a zsuper in a block.
|
void |
setCallInfo(int flags)
Sets the current callInfo, when it cannot be passed other ways
Stack required: none
|
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,
int flags)
InvocationCompilerStack required: context, caller, self, start class, arguments[, block]
invokeInstanceSuper 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,
int flags)
InvocationCompilerStack required: context, caller, self, start class, arguments[, block]
invokeClassSuper 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,
int flags)
InvocationCompilerStack required: context, caller, self, arguments[, block]
invokeUnresolvedSuper 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,
int flags)
InvocationCompilerStack required: context, caller, self, arguments[, block]
invokeZSuper 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 InvocationCompilerpublic void asString(AsStringInstr call, java.lang.String scopeFieldName, java.lang.String file)
InvocationCompilerasString in interface InvocationCompilerpublic void setCallInfo(int flags)
InvocationCompilersetCallInfo in interface InvocationCompilerCopyright © 2001-2023 JRuby. All Rights Reserved.