joeq.Interpreter
Class QuadInterpreter

java.lang.Object
  extended by joeq.Compiler.Quad.QuadVisitor.EmptyVisitor
      extended by joeq.Interpreter.QuadInterpreter
All Implemented Interfaces:
QuadVisitor

public class QuadInterpreter
extends QuadVisitor.EmptyVisitor

Version:
$Id: QuadInterpreter.java 2476 2007-02-28 19:14:41Z joewhaley $
Author:
John Whaley

Nested Class Summary
static class QuadInterpreter.UninitializedReference
           
 
Nested classes/interfaces inherited from interface joeq.Compiler.Quad.QuadVisitor
QuadVisitor.AllQuadVisitor, QuadVisitor.EmptyVisitor
 
Field Summary
static jwutil.collections.Filter interpret_filter
           
static long num_nullchecks
           
static long num_quads
           
static boolean TRACE
           
 
Constructor Summary
QuadInterpreter(jq_Method m)
           
 
Method Summary
 void branchTo(BasicBlock bb)
           
 String currentLocation()
           
 Object[] generateParamArray(jq_Method f, Operand.ParamListOperand plo)
           
 Throwable getCaught()
           
 RegisterFactory.Register getExceptionRegister()
           
 Object getReg_A(RegisterFactory.Register r)
           
 double getReg_D(RegisterFactory.Register r)
           
 float getReg_F(RegisterFactory.Register r)
           
 int getReg_I(RegisterFactory.Register r)
           
 long getReg_L(RegisterFactory.Register r)
           
 Address getReg_P(RegisterFactory.Register r)
           
 Object getReg(RegisterFactory.Register r)
           
 Object getReturnValue()
           
 Throwable getThrown()
           
 void handleException(Throwable x)
           
static QuadInterpreter interpretMethod(jq_Method f, Object[] params)
           
 void interpretMethod(jq_Method m, Object[] params, RegisterFactory rf, ControlFlowGraph cfg)
           
 QuadInterpreter invokeInstanceReflective(jq_InstanceMethod f, Operand.ParamListOperand plo)
           
 QuadInterpreter invokeMethod(jq_Method f, Operand.ParamListOperand plo)
           
 QuadInterpreter invokeReflective(jq_Method f, Operand.ParamListOperand plo)
           
 QuadInterpreter invokeStaticReflective(jq_StaticMethod f, Operand.ParamListOperand plo)
           
static void main(String[] s_args)
           
 void output()
           
 void putReg_A(RegisterFactory.Register r, Object i)
           
 void putReg_D(RegisterFactory.Register r, double i)
           
 void putReg_F(RegisterFactory.Register r, float i)
           
 void putReg_I(RegisterFactory.Register r, int i)
           
 void putReg_L(RegisterFactory.Register r, long i)
           
 void putReg_P(RegisterFactory.Register r, Address i)
           
 void putReg(RegisterFactory.Register r, Object i)
           
 void replaceUninitializedReferences(Object o, QuadInterpreter.UninitializedReference u)
           
 void setReturnValue(Object o)
           
 void setThrown(Throwable t)
           
 String toString()
           
 void trapOnSystemExit()
           
 void visitNullCheck(Quad q)
          A null pointer check instruction.
 void visitQuad(Quad q)
          Any quad.
 
Methods inherited from class joeq.Compiler.Quad.QuadVisitor.EmptyVisitor
visitALength, visitAllocation, visitALoad, visitArray, visitAStore, visitBinary, visitBoundsCheck, visitBranch, visitCheck, visitCheckCast, visitCondBranch, visitExceptionThrower, visitGetfield, visitGetstatic, visitGoto, visitInstanceField, visitInstanceOf, visitIntIfCmp, visitInvoke, visitJsr, visitLoad, visitLookupSwitch, visitMemLoad, visitMemStore, visitMonitor, visitMove, visitNew, visitNewArray, visitPhi, visitPutfield, visitPutstatic, visitRet, visitReturn, visitSpecial, visitStaticField, visitStore, visitStoreCheck, visitTableSwitch, visitTypeCheck, visitUnary, visitZeroCheck
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TRACE

public static boolean TRACE

num_quads

public static long num_quads

num_nullchecks

public static long num_nullchecks

interpret_filter

public static jwutil.collections.Filter interpret_filter
Constructor Detail

QuadInterpreter

public QuadInterpreter(jq_Method m)
Method Detail

visitNullCheck

public void visitNullCheck(Quad q)
Description copied from class: QuadVisitor.EmptyVisitor
A null pointer check instruction.

Specified by:
visitNullCheck in interface QuadVisitor
Overrides:
visitNullCheck in class QuadVisitor.EmptyVisitor

visitQuad

public void visitQuad(Quad q)
Description copied from class: QuadVisitor.EmptyVisitor
Any quad.

Specified by:
visitQuad in interface QuadVisitor
Overrides:
visitQuad in class QuadVisitor.EmptyVisitor

setReturnValue

public void setReturnValue(Object o)

getReturnValue

public Object getReturnValue()

getThrown

public Throwable getThrown()

setThrown

public void setThrown(Throwable t)

getCaught

public Throwable getCaught()

getExceptionRegister

public RegisterFactory.Register getExceptionRegister()

invokeReflective

public QuadInterpreter invokeReflective(jq_Method f,
                                        Operand.ParamListOperand plo)

generateParamArray

public Object[] generateParamArray(jq_Method f,
                                   Operand.ParamListOperand plo)

invokeInstanceReflective

public QuadInterpreter invokeInstanceReflective(jq_InstanceMethod f,
                                                Operand.ParamListOperand plo)

invokeStaticReflective

public QuadInterpreter invokeStaticReflective(jq_StaticMethod f,
                                              Operand.ParamListOperand plo)

invokeMethod

public QuadInterpreter invokeMethod(jq_Method f,
                                    Operand.ParamListOperand plo)

output

public void output()

trapOnSystemExit

public void trapOnSystemExit()

main

public static void main(String[] s_args)
                 throws Throwable
Throws:
Throwable

interpretMethod

public static QuadInterpreter interpretMethod(jq_Method f,
                                              Object[] params)

interpretMethod

public void interpretMethod(jq_Method m,
                            Object[] params,
                            RegisterFactory rf,
                            ControlFlowGraph cfg)

branchTo

public void branchTo(BasicBlock bb)

handleException

public void handleException(Throwable x)

getReg_I

public int getReg_I(RegisterFactory.Register r)

getReg_F

public float getReg_F(RegisterFactory.Register r)

getReg_L

public long getReg_L(RegisterFactory.Register r)

getReg_D

public double getReg_D(RegisterFactory.Register r)

getReg_A

public Object getReg_A(RegisterFactory.Register r)

getReg_P

public Address getReg_P(RegisterFactory.Register r)

getReg

public Object getReg(RegisterFactory.Register r)

putReg_I

public void putReg_I(RegisterFactory.Register r,
                     int i)

putReg_F

public void putReg_F(RegisterFactory.Register r,
                     float i)

putReg_L

public void putReg_L(RegisterFactory.Register r,
                     long i)

putReg_D

public void putReg_D(RegisterFactory.Register r,
                     double i)

putReg_A

public void putReg_A(RegisterFactory.Register r,
                     Object i)

putReg_P

public void putReg_P(RegisterFactory.Register r,
                     Address i)

putReg

public void putReg(RegisterFactory.Register r,
                   Object i)

replaceUninitializedReferences

public void replaceUninitializedReferences(Object o,
                                           QuadInterpreter.UninitializedReference u)

currentLocation

public String currentLocation()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2008 John Whaley. All Rights Reserved.