public abstract class IRBytecodeAdapter extends Object
Modifier and Type | Field and Description |
---|---|
SkinnyMethodAdapter |
adapter |
static int |
MAX_ARGUMENTS |
protected com.headius.invokebinder.Signature |
signature |
Constructor and Description |
---|
IRBytecodeAdapter(SkinnyMethodAdapter adapter,
com.headius.invokebinder.Signature signature,
org.jruby.ir.targets.ClassData classData) |
Modifier and Type | Method and Description |
---|---|
abstract void |
array(int length)
Construct an Array from elements on stack.
|
void |
bfalse(org.objectweb.asm.Label label) |
void |
btrue(org.objectweb.asm.Label label) |
abstract void |
checkpoint()
Perform a thread event checkpoint.
|
void |
endMethod() |
org.jruby.ir.targets.ClassData |
getClassData() |
abstract void |
getField(String name)
Load instance variable from self.
|
void |
goTo(org.objectweb.asm.Label label) |
abstract void |
hash(int length)
Construct a Hash from elements on stack.
|
abstract void |
inheritanceSearchConst(String name,
boolean noPrivateConsts)
Lookup a constant from a given class or module.
|
abstract void |
invokeClassSuper(String name,
int arity,
boolean hasClosure,
boolean[] splatmap)
Invoke a superclass method from a class context.
|
void |
invokeHelper(String name,
Class... x) |
void |
invokeHelper(String name,
String sig) |
abstract void |
invokeInstanceSuper(String name,
int arity,
boolean hasClosure,
boolean[] splatmap)
Invoke a superclass method from an instance context.
|
void |
invokeIRHelper(String name,
String sig) |
abstract void |
invokeOther(String name,
int arity,
boolean hasClosure,
boolean isPotentiallyRefined)
Invoke a method on an object other than self.
|
abstract void |
invokeOtherOneFixnum(String name,
long fixnum)
Invoke a fixnum-receiving method on an object other than self.
|
abstract void |
invokeOtherOneFloat(String name,
double flote)
Invoke a float-receiving method on an object other than self.
|
abstract void |
invokeSelf(String name,
int arity,
boolean hasClosure,
CallType callType,
boolean isPotentiallyRefined)
Invoke a method on self.
|
void |
invokeStatic(org.objectweb.asm.Type type,
org.objectweb.asm.commons.Method method) |
abstract void |
invokeUnresolvedSuper(String name,
int arity,
boolean hasClosure,
boolean[] splatmap)
Invoke a superclass method from an unresolved context.
|
void |
invokeVirtual(org.objectweb.asm.Type type,
org.objectweb.asm.commons.Method method) |
abstract void |
invokeZSuper(String name,
int arity,
boolean hasClosure,
boolean[] splatmap)
Invoke a superclass method from a zsuper in a block.
|
void |
isNil() |
void |
isTrue() |
abstract void |
kwargsHash(int length)
Construct a Hash based on keyword arguments pasesd to this method, for use in zsuper
Stack required: context, kwargs hash to dup, remaining elements of hash
|
abstract void |
lexicalSearchConst(String name)
Lookup a constant from a lexical scope.
|
void |
loadArgs() |
void |
loadBlock() |
void |
loadBlockType() |
void |
loadContext() |
void |
loadFrameClass() |
void |
loadFrameName() |
void |
loadLocal(int i) |
abstract void |
loadRuntime()
Push the JRuby runtime on the stack.
|
void |
loadSelf() |
void |
loadStaticScope() |
void |
loadSuperName() |
void |
mark(org.objectweb.asm.Label label) |
org.objectweb.asm.Label |
newLabel() |
int |
newLocal(String name,
org.objectweb.asm.Type type) |
void |
poll() |
abstract void |
pushBignum(BigInteger bigint)
Load a Bignum onto the stack.
|
void |
pushBlockBody(org.objectweb.asm.Handle handle,
Signature signature,
String className) |
abstract void |
pushBoolean(boolean b)
Load a boolean onto the stack.
|
abstract void |
pushByteList(org.jruby.util.ByteList bl)
Stack required: none
|
abstract void |
pushDRegexp(Runnable callback,
RegexpOptions options,
int arity)
Build a dynamic regexp.
|
abstract void |
pushEncoding(org.jcodings.Encoding encoding)
Push an encoding on the stack.
|
abstract void |
pushFixnum(long l)
Stack required: none
|
abstract void |
pushFloat(double d)
Stack required: none
|
abstract void |
pushFrozenString(org.jruby.util.ByteList bl,
int cr)
Stack required: none
|
void |
pushHandle(org.objectweb.asm.Handle handle) |
abstract void |
pushNil()
Load nil onto the stack.
|
void |
pushObjectClass() |
abstract void |
pushRegexp(org.jruby.util.ByteList source,
int options)
Build and save a literal regular expression.
|
abstract void |
pushString(org.jruby.util.ByteList bl,
int cr)
Stack required: none
|
abstract void |
pushSymbol(String sym,
org.jcodings.Encoding encoding)
Push a symbol on the stack.
|
void |
pushUndefined() |
abstract void |
putField(String name)
Store instance variable into self.
|
void |
returnValue() |
abstract void |
searchConst(String name,
boolean noPrivateConsts)
Lookup a constant from current context.
|
void |
startMethod() |
void |
storeLocal(int i) |
public static final int MAX_ARGUMENTS
public SkinnyMethodAdapter adapter
protected final com.headius.invokebinder.Signature signature
public IRBytecodeAdapter(SkinnyMethodAdapter adapter, com.headius.invokebinder.Signature signature, org.jruby.ir.targets.ClassData classData)
public org.jruby.ir.targets.ClassData getClassData()
public void startMethod()
public void endMethod()
public void loadLocal(int i)
public void loadContext()
public void loadStaticScope()
public void loadSelf()
public void loadArgs()
public void loadBlock()
public void loadFrameClass()
public void loadFrameName()
public void loadSuperName()
public void loadBlockType()
public void storeLocal(int i)
public void invokeVirtual(org.objectweb.asm.Type type, org.objectweb.asm.commons.Method method)
public void invokeStatic(org.objectweb.asm.Type type, org.objectweb.asm.commons.Method method)
public void goTo(org.objectweb.asm.Label label)
public void isTrue()
public void isNil()
public void bfalse(org.objectweb.asm.Label label)
public void btrue(org.objectweb.asm.Label label)
public void poll()
public void pushObjectClass()
public void pushUndefined()
public void pushHandle(org.objectweb.asm.Handle handle)
public void mark(org.objectweb.asm.Label label)
public void returnValue()
public int newLocal(String name, org.objectweb.asm.Type type)
public org.objectweb.asm.Label newLabel()
public void pushBlockBody(org.objectweb.asm.Handle handle, Signature signature, String className)
public abstract void pushFixnum(long l)
l
- long value to push as a Fixnumpublic abstract void pushFloat(double d)
d
- double value to push as a Floatpublic abstract void pushString(org.jruby.util.ByteList bl, int cr)
bl
- ByteList for the String to pushpublic abstract void pushFrozenString(org.jruby.util.ByteList bl, int cr)
bl
- ByteList for the String to pushpublic abstract void pushByteList(org.jruby.util.ByteList bl)
bl
- ByteList to pushpublic abstract void pushRegexp(org.jruby.util.ByteList source, int options)
options
- options for the regexppublic abstract void pushDRegexp(Runnable callback, RegexpOptions options, int arity)
options
- options for the regexparity
- number of Strings passed inpublic abstract void pushSymbol(String sym, org.jcodings.Encoding encoding)
sym
- the symbol's string identifierpublic abstract void loadRuntime()
public abstract void pushEncoding(org.jcodings.Encoding encoding)
encoding
- the encoding to pushpublic abstract void invokeOther(String name, int arity, boolean hasClosure, boolean isPotentiallyRefined)
name
- name of the method to invokearity
- arity of the callhasClosure
- whether a closure will be on the stack for passingpublic abstract void invokeOtherOneFixnum(String name, long fixnum)
name
- name of the method to invokepublic abstract void invokeOtherOneFloat(String name, double flote)
name
- name of the method to invokepublic abstract void invokeSelf(String name, int arity, boolean hasClosure, CallType callType, boolean isPotentiallyRefined)
name
- name of the method to invokearity
- arity of the callhasClosure
- whether a closure will be on the stack for passingcallType
- public abstract void invokeInstanceSuper(String name, int arity, boolean hasClosure, boolean[] splatmap)
name
- 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 abstract void invokeClassSuper(String name, int arity, boolean hasClosure, boolean[] splatmap)
name
- 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 abstract void invokeUnresolvedSuper(String name, int arity, boolean hasClosure, boolean[] splatmap)
name
- 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 abstract void invokeZSuper(String name, int arity, boolean hasClosure, boolean[] splatmap)
name
- 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 abstract void searchConst(String name, boolean noPrivateConsts)
name
- name of the constantnoPrivateConsts
- whether to ignore private constantspublic abstract void inheritanceSearchConst(String name, boolean noPrivateConsts)
name
- name of the constantnoPrivateConsts
- whether to ignore private constantspublic abstract void lexicalSearchConst(String name)
name
- name of the constantpublic abstract void pushNil()
public abstract void pushBoolean(boolean b)
b
- the boolean to pushpublic abstract void pushBignum(BigInteger bigint)
bigint
- the value of the Bignum to pushpublic abstract void putField(String name)
name
- name of variable to storepublic abstract void getField(String name)
name
- name of variable to loadpublic abstract void array(int length)
length
- number of elementspublic abstract void hash(int length)
length
- number of element pairspublic abstract void kwargsHash(int length)
length
- number of element pairspublic abstract void checkpoint()
Copyright © 2001-2015 JRuby. All Rights Reserved.