public abstract class AbstractCodeAssembler extends Object implements CodeAssembler
CONVERT_FP_BITS, CONVERT_FP_NORMAL, CONVERT_FP_RAW_BITS
Modifier | Constructor and Description |
---|---|
protected |
AbstractCodeAssembler() |
Modifier and Type | Method and Description |
---|---|
LocalVariable |
createLocalVariable(TypeDesc type)
Creates an unnamed LocalVariable.
|
void |
ifComparisonBranch(Location location,
String choice,
TypeDesc type)
Generates code the performs a conditional branch based on a comparison
between two values of the given type on the stack.
|
void |
inline(Object code)
Allows code to disassembled and copied straight in.
|
void |
invoke(Constructor constructor)
Generates code to invoke a class constructor in any class.
|
void |
invoke(Method method)
Generates code to invoke a method.
|
void |
invokeSuper(Method method)
Generates code to invoke a method in the super class.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
arrayLength, branch, breakpoint, checkCast, convert, convert, createLabel, createLocalVariable, dup, dup2, dup2X1, dup2X2, dupX1, dupX2, exceptionHandler, getParameter, getParameterCount, ifComparisonBranch, ifEqualBranch, ifNullBranch, ifZeroComparisonBranch, instanceOf, integerIncrement, invokeConstructor, invokeConstructor, invokeConstructor, invokeInterface, invokeInterface, invokePrivate, invokeStatic, invokeStatic, invokeStatic, invokeSuper, invokeSuper, invokeSuperConstructor, invokeVirtual, invokeVirtual, invokeVirtual, jsr, loadConstant, loadConstant, loadConstant, loadConstant, loadConstant, loadConstant, loadConstant, loadField, loadField, loadField, loadFromArray, loadLocal, loadNull, loadStaticField, loadStaticField, loadStaticField, loadThis, mapLineNumber, math, monitorEnter, monitorExit, newObject, newObject, nop, pop, pop2, ret, returnValue, returnVoid, storeField, storeField, storeField, storeLocal, storeStaticField, storeStaticField, storeStaticField, storeToArray, swap, swap2, switchBranch, throwObject
public LocalVariable createLocalVariable(TypeDesc type)
CodeAssembler
createLocalVariable
in interface CodeAssembler
type
- The type of data that the requested LocalVariable can store.public void ifComparisonBranch(Location location, String choice, TypeDesc type)
CodeAssembler
When comparing floating point values, treatment of NaN requires special attention. Ordinarily, it is assumed that the branch location represents the target of a comparison failure, and that the code to handle the "true" condition immediately follows the comparison. If this is not the case, append a 't' suffix to the choice to indicate that the target location is reached for a "true" condition. This suffix is ignored if the type is not a float or double.
The generated instruction(s) consumes the two values on the stack.
ifComparisonBranch
in interface CodeAssembler
location
- The location to branch tochoice
- One of "==", "!=", "<", ">=", ">", "<=", "==t", "!=t",
"type
- Type to expect on the stackpublic void inline(Object code)
CodeAssembler
inline
in interface CodeAssembler
public void invoke(Method method)
CodeAssembler
invoke
in interface CodeAssembler
public void invokeSuper(Method method)
CodeAssembler
invokeSuper
in interface CodeAssembler
public void invoke(Constructor constructor)
CodeAssembler
invoke
in interface CodeAssembler
Copyright © 2004-2015 Cojen. All Rights Reserved.