Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.jxcl.cl
Class SortedBlocks  view SortedBlocks download SortedBlocks.java

java.lang.Object
  extended byorg.jxcl.cl.SortedBlocks

public class SortedBlocks
extends java.lang.Object

Manages an index into the bytecode vertices in a method's control flow graph. The vertices (blocks) are indexed by their position in the original code. The blocks may be from different graphs in a set of nested graphs.


Field Summary
private  java.util.SortedMap blox
           
private  ControlFlowGraph graph
           
 
Constructor Summary
SortedBlocks()
          Creates an empty map.
 
Method Summary
 boolean add(CodeVertex v)
          Add a vertex at its bytecode position.
 CodeVertex add(int pos, org.jxcl.graph.Edge e)
          Add a vertex at bytecode offset pos along edge e.
 boolean exists(int pos)
          Does a vertex exist with this bytecode offset?
 CodeVertex find(int pos, ControlFlowGraph currGraph, org.jxcl.graph.Edge e)
          Find or create a code vertex starting at a given position.
 CodeVertex get(int pos)
          Find the code vertex starting at a given bytecode offset.
 int size()
          How many code vertices are currently in the index?
 java.lang.String toString()
          Standard toString(), XXX needs some work.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

graph

private ControlFlowGraph graph

blox

private java.util.SortedMap blox
Constructor Detail

SortedBlocks

public SortedBlocks()
Creates an empty map.

Method Detail

add

public boolean add(CodeVertex v)
Add a vertex at its bytecode position. * It is an error if there is already a vertex at this position. XXX SHOULD THROW EXCEPTION IN SUCH A CASE.


find

public CodeVertex find(int pos,
                       ControlFlowGraph currGraph,
                       org.jxcl.graph.Edge e)
Find or create a code vertex starting at a given position.


add

public CodeVertex add(int pos,
                      org.jxcl.graph.Edge e)
Add a vertex at bytecode offset pos along edge e. No other vertex with that bytecode offset may exist.


exists

public boolean exists(int pos)
Does a vertex exist with this bytecode offset?


get

public CodeVertex get(int pos)
Find the code vertex starting at a given bytecode offset. The vertex must exist. XXX Should throw an exception if it doesn't.


size

public int size()
How many code vertices are currently in the index?


toString

public java.lang.String toString()
Standard toString(), XXX needs some work.