org.apache.commons.nabla.algorithmic.forward.analysis
Class TrackingValue

java.lang.Object
  extended by org.apache.commons.nabla.algorithmic.forward.analysis.TrackingValue
All Implemented Interfaces:
org.objectweb.asm.tree.analysis.Value

public class TrackingValue
extends Object
implements org.objectweb.asm.tree.analysis.Value

A value that keep track of both instructions producing and consuming it.


Field Summary
static TrackingValue UNINITIALIZED_VALUE
          Special value for uninitialized values.
 
Constructor Summary
TrackingValue(org.objectweb.asm.tree.analysis.BasicValue value)
          Build a new value without any link to instructions.
 
Method Summary
 void addConsumer(org.objectweb.asm.tree.AbstractInsnNode consumer)
          Add a consumer for this value.
 void addProducer(org.objectweb.asm.tree.AbstractInsnNode producer)
          Add a producer for this value.
 Set<org.objectweb.asm.tree.AbstractInsnNode> getConsumers()
          Get the consumers for this value and all values it is merged with.
 Set<org.objectweb.asm.tree.AbstractInsnNode> getProducers()
          Get the producers for this value and all values it is merged with.
 int getSize()
          
 org.objectweb.asm.tree.analysis.BasicValue getValue()
          Get the wrapped BasicValue.
static void merge(TrackingValue value1, TrackingValue value2)
          Merge two instances.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNINITIALIZED_VALUE

public static final TrackingValue UNINITIALIZED_VALUE
Special value for uninitialized values.

Constructor Detail

TrackingValue

public TrackingValue(org.objectweb.asm.tree.analysis.BasicValue value)
Build a new value without any link to instructions.

Parameters:
value - wrapped BasicValue value
Method Detail

getValue

public org.objectweb.asm.tree.analysis.BasicValue getValue()
Get the wrapped BasicValue.

Returns:
wrapped BasicValue

getSize

public int getSize()

Specified by:
getSize in interface org.objectweb.asm.tree.analysis.Value

addConsumer

public void addConsumer(org.objectweb.asm.tree.AbstractInsnNode consumer)
Add a consumer for this value.

Parameters:
consumer - consumer for this value

getConsumers

public Set<org.objectweb.asm.tree.AbstractInsnNode> getConsumers()
Get the consumers for this value and all values it is merged with.

Returns:
the instructions consuming either this value or the values it has been merged with

addProducer

public void addProducer(org.objectweb.asm.tree.AbstractInsnNode producer)
Add a producer for this value.

Parameters:
producer - producer for this value

getProducers

public Set<org.objectweb.asm.tree.AbstractInsnNode> getProducers()
Get the producers for this value and all values it is merged with.

Returns:
the instructions producing either this value or the values it has been merged with

merge

public static void merge(TrackingValue value1,
                         TrackingValue value2)
Merge two instances.

Once merged, values share the same producers and consumers sets.

Parameters:
value1 - first value to merge
value2 - second value to merge


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.