|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.cojen.classfile.AbstractCodeAssembler
public abstract class AbstractCodeAssembler
Field Summary |
---|
Fields inherited from interface org.cojen.classfile.CodeAssembler |
---|
CONVERT_FP_BITS, CONVERT_FP_NORMAL, CONVERT_FP_RAW_BITS |
Constructor Summary | |
---|---|
protected |
AbstractCodeAssembler()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected AbstractCodeAssembler()
Method Detail |
---|
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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |