|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object joeq.Compiler.Quad.x86.SimpleCompiler
public class SimpleCompiler
Nested Class Summary | |
---|---|
static class |
SimpleCompiler.Factory
|
Nested classes/interfaces inherited from interface joeq.Compiler.Quad.BasicBlockVisitor |
---|
BasicBlockVisitor.AllBasicBlockVisitor, BasicBlockVisitor.EmptyVisitor |
Nested classes/interfaces inherited from interface joeq.Compiler.Quad.QuadVisitor |
---|
QuadVisitor.AllQuadVisitor, QuadVisitor.EmptyVisitor |
Field Summary | |
---|---|
static boolean |
ALWAYS_TRACE
|
ControlFlowGraph |
cfg
|
static int |
DEFAULT_ALIGNMENT
|
jq_Method |
method
|
Map |
registerLocations
|
static int |
THREAD_BLOCK_OFFSET
|
static byte |
THREAD_BLOCK_PREFIX
|
boolean |
TRACE
|
static boolean |
TRACE_STUBS
|
boolean |
TraceArguments
|
static Set |
TraceMethod_ClassNames
|
static Set |
TraceMethod_MethodNames
|
boolean |
TraceMethods
|
static Set |
TraceQuad_ClassNames
|
static Set |
TraceQuad_MethodNames
|
boolean |
TraceQuads
|
Fields inherited from interface joeq.Assembler.x86.x86Constants |
---|
AL, AX, BOUNDS_EX_NUM, CACHE_LINE_SIZE, CJUMP_NEAR, CJUMP_SHORT, COMPLEX, EAX, EBP, EBX, ECX, EDI, EDX, ESI, ESP, JUMP_NEAR, JUMP_SHORT, MOD_DISP32, MOD_DISP8, MOD_EA, MOD_REG, NP, PU, PV, RA, RM_SIB, SCALE_1, SCALE_2, SCALE_4, SCALE_8, SEIMM8, SHIFT_ONCE, UV |
Constructor Summary | |
---|---|
SimpleCompiler()
|
|
SimpleCompiler(ControlFlowGraph cfg)
|
|
SimpleCompiler(jq_Method m)
|
Method Summary | |
---|---|
jq_CompiledCode |
compile()
|
void |
emitCallMemory(jq_StaticField f)
|
static void |
emitCallMemory(jq_StaticField f,
x86Assembler asm,
List data_relocs)
|
void |
emitCallRelative(jq_Method target)
|
static void |
emitCallRelative(jq_Method target,
x86Assembler asm,
List code_relocs)
|
void |
emitFLD64(jq_StaticField f)
|
static void |
emitFLD64(jq_StaticField f,
x86Assembler asm,
List data_relocs)
|
void |
emitPopMemory(jq_StaticField f)
|
static void |
emitPopMemory(jq_StaticField f,
x86Assembler asm,
List data_relocs)
|
void |
emitPopMemory8(jq_StaticField f)
|
static void |
emitPopMemory8(jq_StaticField f,
x86Assembler asm,
List data_relocs)
|
void |
emitPushAddressOf(Object o)
|
static void |
emitPushAddressOf(Object o,
x86Assembler asm,
List data_relocs)
|
void |
emitPushMemory(jq_StaticField f)
|
static void |
emitPushMemory(jq_StaticField f,
x86Assembler asm,
List data_relocs)
|
void |
emitPushMemory8(jq_StaticField f)
|
static void |
emitPushMemory8(jq_StaticField f,
x86Assembler asm,
List data_relocs)
|
static jq_CompiledCode |
generate_compile_stub(jq_Method method)
|
List |
getCodeRelocs()
|
List |
getDataRelocs()
|
void |
init(ControlFlowGraph cfg)
|
void |
init(jq_Method m)
|
static void |
main(String[] args)
|
String |
toString()
|
void |
visitALength(Quad obj)
An array length instruction. |
void |
visitAllocation(Quad obj)
An instruction.that does an allocation. |
void |
visitALoad(Quad obj)
An array load instruction. |
void |
visitArray(Quad obj)
An instruction.that accesses an array. |
void |
visitAStore(Quad obj)
An array store instruction. |
void |
visitBasicBlock(BasicBlock bb)
Visit a basic block. |
void |
visitBinary(Quad obj)
A binary operation instruction. |
void |
visitBoundsCheck(Quad obj)
An array bounds check instruction. |
void |
visitBranch(Quad obj)
An instruction that may branch (not including exceptional control flow). |
void |
visitCheck(Quad obj)
An exception check instruction. |
void |
visitCheckCast(Quad obj)
A type cast check instruction. |
void |
visitCondBranch(Quad obj)
A conditional branch instruction. |
void |
visitExceptionThrower(Quad obj)
A potentially excepting instruction.. |
void |
visitGetfield(Quad obj)
A get instance field instruction. |
void |
visitGetstatic(Quad obj)
A get static field instruction. |
void |
visitGoto(Quad obj)
A goto instruction. |
void |
visitInstanceField(Quad obj)
An instruction.that accesses an instance field. |
void |
visitInstanceOf(Quad obj)
A type instance of instruction. |
void |
visitIntIfCmp(Quad obj)
A compare and branch instruction. |
void |
visitInvoke(Quad obj)
An invoke instruction. |
void |
visitJsr(Quad obj)
A jump local subroutine instruction. |
void |
visitLoad(Quad obj)
An instruction that loads from memory. |
void |
visitLookupSwitch(Quad obj)
A lookup switch instruction. |
void |
visitMemLoad(Quad obj)
A raw memory load instruction. |
void |
visitMemStore(Quad obj)
A raw memory store instruction. |
void |
visitMonitor(Quad obj)
An object monitor lock/unlock instruction. |
void |
visitMove(Quad obj)
A register move instruction. |
void |
visitNew(Quad obj)
An object allocation instruction. |
void |
visitNewArray(Quad obj)
An array allocation instruction. |
void |
visitNullCheck(Quad obj)
A null pointer check instruction. |
void |
visitPhi(Quad obj)
A phi instruction. |
void |
visitPutfield(Quad obj)
A put instance field instruction. |
void |
visitPutstatic(Quad obj)
A put static field instruction. |
void |
visitQuad(Quad obj)
Any quad. |
void |
visitRet(Quad obj)
A return from local subroutine instruction. |
void |
visitReturn(Quad obj)
A return from method instruction. |
void |
visitSpecial(Quad obj)
A special instruction. |
void |
visitStaticField(Quad obj)
An instruction.that accesses a static field. |
void |
visitStore(Quad obj)
An instruction that stores into memory. |
void |
visitStoreCheck(Quad obj)
An object array store type check instruction. |
void |
visitTableSwitch(Quad obj)
A jump table switch instruction. |
void |
visitTypeCheck(Quad obj)
An instruction.that does a type check. |
void |
visitUnary(Quad obj)
A unary operation instruction. |
void |
visitZeroCheck(Quad obj)
A divide-by-zero check instruction. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static boolean ALWAYS_TRACE
public static boolean TRACE_STUBS
public static final Set TraceMethod_MethodNames
public static final Set TraceMethod_ClassNames
public static final Set TraceQuad_MethodNames
public static final Set TraceQuad_ClassNames
public boolean TraceQuads
public boolean TraceMethods
public boolean TraceArguments
public static final int DEFAULT_ALIGNMENT
public ControlFlowGraph cfg
public jq_Method method
public Map registerLocations
public boolean TRACE
public static byte THREAD_BLOCK_PREFIX
public static int THREAD_BLOCK_OFFSET
Constructor Detail |
---|
public SimpleCompiler()
public SimpleCompiler(ControlFlowGraph cfg)
public SimpleCompiler(jq_Method m)
Method Detail |
---|
public void init(jq_Method m)
public void init(ControlFlowGraph cfg)
public String toString()
toString
in class Object
public final void emitCallRelative(jq_Method target)
public static final void emitCallRelative(jq_Method target, x86Assembler asm, List code_relocs)
public final void emitPushAddressOf(Object o)
public static final void emitPushAddressOf(Object o, x86Assembler asm, List data_relocs)
public final void emitPushMemory(jq_StaticField f)
public static final void emitPushMemory(jq_StaticField f, x86Assembler asm, List data_relocs)
public final void emitPushMemory8(jq_StaticField f)
public static final void emitPushMemory8(jq_StaticField f, x86Assembler asm, List data_relocs)
public final void emitPopMemory(jq_StaticField f)
public static final void emitPopMemory(jq_StaticField f, x86Assembler asm, List data_relocs)
public final void emitPopMemory8(jq_StaticField f)
public static final void emitPopMemory8(jq_StaticField f, x86Assembler asm, List data_relocs)
public final void emitCallMemory(jq_StaticField f)
public static final void emitCallMemory(jq_StaticField f, x86Assembler asm, List data_relocs)
public final void emitFLD64(jq_StaticField f)
public static final void emitFLD64(jq_StaticField f, x86Assembler asm, List data_relocs)
public final List getCodeRelocs()
public final List getDataRelocs()
public static final jq_CompiledCode generate_compile_stub(jq_Method method)
public final jq_CompiledCode compile()
public void visitBasicBlock(BasicBlock bb)
BasicBlockVisitor
visitBasicBlock
in interface BasicBlockVisitor
bb
- basic block to visitpublic void visitExceptionThrower(Quad obj)
QuadVisitor
visitExceptionThrower
in interface QuadVisitor
QuadVisitor.visitExceptionThrower(joeq.Compiler.Quad.Quad)
public void visitLoad(Quad obj)
QuadVisitor
visitLoad
in interface QuadVisitor
QuadVisitor.visitLoad(joeq.Compiler.Quad.Quad)
public void visitStore(Quad obj)
QuadVisitor
visitStore
in interface QuadVisitor
QuadVisitor.visitStore(joeq.Compiler.Quad.Quad)
public void visitBranch(Quad obj)
QuadVisitor
visitBranch
in interface QuadVisitor
QuadVisitor.visitBranch(joeq.Compiler.Quad.Quad)
public void visitCondBranch(Quad obj)
QuadVisitor
visitCondBranch
in interface QuadVisitor
QuadVisitor.visitCondBranch(joeq.Compiler.Quad.Quad)
public void visitCheck(Quad obj)
QuadVisitor
visitCheck
in interface QuadVisitor
QuadVisitor.visitCheck(joeq.Compiler.Quad.Quad)
public void visitStaticField(Quad obj)
QuadVisitor
visitStaticField
in interface QuadVisitor
QuadVisitor.visitStaticField(joeq.Compiler.Quad.Quad)
public void visitInstanceField(Quad obj)
QuadVisitor
visitInstanceField
in interface QuadVisitor
QuadVisitor.visitInstanceField(joeq.Compiler.Quad.Quad)
public void visitArray(Quad obj)
QuadVisitor
visitArray
in interface QuadVisitor
QuadVisitor.visitArray(joeq.Compiler.Quad.Quad)
public void visitAllocation(Quad obj)
QuadVisitor
visitAllocation
in interface QuadVisitor
QuadVisitor.visitAllocation(joeq.Compiler.Quad.Quad)
public void visitTypeCheck(Quad obj)
QuadVisitor
visitTypeCheck
in interface QuadVisitor
QuadVisitor.visitTypeCheck(joeq.Compiler.Quad.Quad)
public void visitALoad(Quad obj)
QuadVisitor
visitALoad
in interface QuadVisitor
QuadVisitor.visitALoad(joeq.Compiler.Quad.Quad)
public void visitAStore(Quad obj)
QuadVisitor
visitAStore
in interface QuadVisitor
QuadVisitor.visitAStore(joeq.Compiler.Quad.Quad)
public void visitALength(Quad obj)
QuadVisitor
visitALength
in interface QuadVisitor
QuadVisitor.visitALength(joeq.Compiler.Quad.Quad)
public void visitBinary(Quad obj)
QuadVisitor
visitBinary
in interface QuadVisitor
QuadVisitor.visitBinary(joeq.Compiler.Quad.Quad)
public void visitBoundsCheck(Quad obj)
QuadVisitor
visitBoundsCheck
in interface QuadVisitor
QuadVisitor.visitBoundsCheck(joeq.Compiler.Quad.Quad)
public void visitCheckCast(Quad obj)
QuadVisitor
visitCheckCast
in interface QuadVisitor
QuadVisitor.visitCheckCast(joeq.Compiler.Quad.Quad)
public void visitGetfield(Quad obj)
QuadVisitor
visitGetfield
in interface QuadVisitor
QuadVisitor.visitGetfield(joeq.Compiler.Quad.Quad)
public void visitGetstatic(Quad obj)
QuadVisitor
visitGetstatic
in interface QuadVisitor
QuadVisitor.visitGetstatic(joeq.Compiler.Quad.Quad)
public void visitGoto(Quad obj)
QuadVisitor
visitGoto
in interface QuadVisitor
QuadVisitor.visitGoto(joeq.Compiler.Quad.Quad)
public void visitInstanceOf(Quad obj)
QuadVisitor
visitInstanceOf
in interface QuadVisitor
QuadVisitor.visitInstanceOf(joeq.Compiler.Quad.Quad)
public void visitIntIfCmp(Quad obj)
QuadVisitor
visitIntIfCmp
in interface QuadVisitor
QuadVisitor.visitIntIfCmp(joeq.Compiler.Quad.Quad)
public void visitInvoke(Quad obj)
QuadVisitor
visitInvoke
in interface QuadVisitor
QuadVisitor.visitInvoke(joeq.Compiler.Quad.Quad)
public void visitJsr(Quad obj)
QuadVisitor
visitJsr
in interface QuadVisitor
QuadVisitor.visitJsr(joeq.Compiler.Quad.Quad)
public void visitLookupSwitch(Quad obj)
QuadVisitor
visitLookupSwitch
in interface QuadVisitor
QuadVisitor.visitLookupSwitch(joeq.Compiler.Quad.Quad)
public void visitMemLoad(Quad obj)
QuadVisitor
visitMemLoad
in interface QuadVisitor
QuadVisitor.visitMemLoad(joeq.Compiler.Quad.Quad)
public void visitMemStore(Quad obj)
QuadVisitor
visitMemStore
in interface QuadVisitor
QuadVisitor.visitMemStore(joeq.Compiler.Quad.Quad)
public void visitMonitor(Quad obj)
QuadVisitor
visitMonitor
in interface QuadVisitor
QuadVisitor.visitMonitor(joeq.Compiler.Quad.Quad)
public void visitMove(Quad obj)
QuadVisitor
visitMove
in interface QuadVisitor
QuadVisitor.visitMove(joeq.Compiler.Quad.Quad)
public void visitPhi(Quad obj)
QuadVisitor
visitPhi
in interface QuadVisitor
QuadVisitor.visitPhi(joeq.Compiler.Quad.Quad)
public void visitNew(Quad obj)
QuadVisitor
visitNew
in interface QuadVisitor
QuadVisitor.visitNew(joeq.Compiler.Quad.Quad)
public void visitNewArray(Quad obj)
QuadVisitor
visitNewArray
in interface QuadVisitor
QuadVisitor.visitNewArray(joeq.Compiler.Quad.Quad)
public void visitNullCheck(Quad obj)
QuadVisitor
visitNullCheck
in interface QuadVisitor
QuadVisitor.visitNullCheck(joeq.Compiler.Quad.Quad)
public void visitPutfield(Quad obj)
QuadVisitor
visitPutfield
in interface QuadVisitor
QuadVisitor.visitPutfield(joeq.Compiler.Quad.Quad)
public void visitPutstatic(Quad obj)
QuadVisitor
visitPutstatic
in interface QuadVisitor
QuadVisitor.visitPutstatic(joeq.Compiler.Quad.Quad)
public void visitRet(Quad obj)
QuadVisitor
visitRet
in interface QuadVisitor
QuadVisitor.visitRet(joeq.Compiler.Quad.Quad)
public void visitReturn(Quad obj)
QuadVisitor
visitReturn
in interface QuadVisitor
QuadVisitor.visitReturn(joeq.Compiler.Quad.Quad)
public void visitSpecial(Quad obj)
QuadVisitor
visitSpecial
in interface QuadVisitor
QuadVisitor.visitSpecial(joeq.Compiler.Quad.Quad)
public void visitStoreCheck(Quad obj)
QuadVisitor
visitStoreCheck
in interface QuadVisitor
QuadVisitor.visitStoreCheck(joeq.Compiler.Quad.Quad)
public void visitTableSwitch(Quad obj)
QuadVisitor
visitTableSwitch
in interface QuadVisitor
QuadVisitor.visitTableSwitch(joeq.Compiler.Quad.Quad)
public void visitUnary(Quad obj)
QuadVisitor
visitUnary
in interface QuadVisitor
QuadVisitor.visitUnary(joeq.Compiler.Quad.Quad)
public void visitZeroCheck(Quad obj)
QuadVisitor
visitZeroCheck
in interface QuadVisitor
QuadVisitor.visitZeroCheck(joeq.Compiler.Quad.Quad)
public void visitQuad(Quad obj)
QuadVisitor
visitQuad
in interface QuadVisitor
QuadVisitor.visitQuad(joeq.Compiler.Quad.Quad)
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |