harpoon.Util.LightBasicBlocks
Class CachingLBBConverter

java.lang.Object
  extended by harpoon.Util.LightBasicBlocks.LBBConverter
      extended by harpoon.Util.LightBasicBlocks.CachingLBBConverter
All Implemented Interfaces:
Serializable

public class CachingLBBConverter
extends LBBConverter
implements Serializable

CachingLBBConverter adds some caching to the LBBConverter.

Version:
$Id: CachingLBBConverter.java,v 1.2 2002/02/25 21:09:33 cananian Exp $
Author:
Alexandru SALCIANU <salcianu@retezat.lcs.mit.edu>
See Also:
Serialized Form

Constructor Summary
CachingLBBConverter(BBConverter bbconv)
          Creates a CachingLBBConverter.
 
Method Summary
 void clear()
          Completely clears the internal cache.
 void clear(HMethod hm)
          Remove from the internal cache the result for hm.
 LightBasicBlock.Factory convert2lbb(HMethod hm)
          Returns a LighBasicBlock.Factory for the body of a method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CachingLBBConverter

public CachingLBBConverter(BBConverter bbconv)
Creates a CachingLBBConverter.

Method Detail

convert2lbb

public LightBasicBlock.Factory convert2lbb(HMethod hm)
Returns a LighBasicBlock.Factory for the body of a method. Uses the already precomputed result if one exists.

Overrides:
convert2lbb in class LBBConverter

clear

public void clear(HMethod hm)
Remove from the internal cache the result for hm. This is useful if hm was modified and a new LightBasicBlock view needs to be generated for it.


clear

public void clear()
Completely clears the internal cache.