Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

JimpleStoreBuilder Class Reference

Inheritance diagram for JimpleStoreBuilder:
[legend]
Collaboration diagram for JimpleStoreBuilder:
[legend]
List of all members.

Public Methods

 JimpleStoreBuilder (BirState state)
void caseArray (Array type, Object o)
void caseBool (Bool type, Object o)
void caseLock (Lock type, Object o)
void caseRange (Range type, Object o)
void caseRecord (Record type, Object o)
void caseRef (Ref type, Object o)
void defaultCase (Object obj)

Private Methods

int getVarOffset (Object context)
Literal getVarValue (Object context)

Private Attributes

BirState state
Literal[] birStore
TransSystem system
Hashtable objectTable = new Hashtable()

Detailed Description

Jimple type switch that constructs a JimpleStore from a BirState by translating BIR literal values into JimpleLiterals (by type).

Most cases are straightforward (we just map the BIR Literal to the equivalent Jimple Literal). For objects (records an arrays), however, we must collect all their components from the BIR state vector into a ClassLiteral or ArrayLiteral.

Definition at line 53 of file JimpleStoreBuilder.java.


Member Function Documentation

int JimpleStoreBuilder::getVarOffset Object   context [inline, private]
 

Get offset of context in state vector.

The context is either an Integer (address) or StateVar.

Definition at line 180 of file JimpleStoreBuilder.java.

Literal JimpleStoreBuilder::getVarValue Object   context [inline, private]
 

Get the value of a context in the state vector.

Definition at line 190 of file JimpleStoreBuilder.java.


Member Data Documentation

Hashtable JimpleStoreBuilder::objectTable = new Hashtable() [private]
 

The object table holds the set of ObjectLiterals that we have already constructed. We want to translate a given object only once per state, but we may encounter many references to the same object, so we check this table before constructing an array or record object literal.

Definition at line 68 of file JimpleStoreBuilder.java.


The documentation for this class was generated from the following file:
Generated at Thu Feb 7 07:17:57 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001