org.jikesrvm.compilers.opt.inlining
Class ClassLoadingDependencyManager

java.lang.Object
  extended by org.jikesrvm.compilers.opt.inlining.ClassLoadingDependencyManager
All Implemented Interfaces:
ClassLoadingListener

public final class ClassLoadingDependencyManager
extends Object
implements ClassLoadingListener

This class acts as an intermediary between RVMClassLoader and the optimizing compiler's dependency database. Just before a class is marked as INITIALIZED, RVMClass.initialize() invokes ClassLoadingDependencyManager.classInitialized(), which is responsible for identifying and performing all necessary invalidations of opt compiler code.


Field Summary
private  InvalidationDatabase db
          Database holding information on class loading
(package private) static boolean DEBUG
          Debug execution
private static PrintStream log
          Stream used in debug tracing
(package private) static boolean TRACE
          Trace execution
 
Constructor Summary
ClassLoadingDependencyManager()
           
 
Method Summary
 void addNoSubclassDependency(RVMClass source, CompiledMethod cm)
          Record that the code currently being compiled (cm) must be invalidated if source ever has a subclass.
 void addNotOverriddenDependency(RVMMethod source, CompiledMethod cm)
          Record that the code currently being compiled (cm) must be invalidated if source is overridden.
 void classInitialized(RVMClass c, boolean writingBootImage)
           
private  void handleOverriddenMethods(RVMClass c)
          Take action when a method is overridden.
private  void handleSubclassing(RVMClass c)
           
private  void invalidate(CompiledMethod cm)
          helper method to invalidate a particular compiled method
private  void processOverride(RVMMethod overridden)
           
(package private)  void report(String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

db

private final InvalidationDatabase db
Database holding information on class loading


DEBUG

static final boolean DEBUG
Debug execution

See Also:
Constant Field Values

TRACE

static final boolean TRACE
Trace execution

See Also:
Constant Field Values

log

private static PrintStream log
Stream used in debug tracing

Constructor Detail

ClassLoadingDependencyManager

public ClassLoadingDependencyManager()
Method Detail

classInitialized

public void classInitialized(RVMClass c,
                             boolean writingBootImage)
Specified by:
classInitialized in interface ClassLoadingListener

addNotOverriddenDependency

public void addNotOverriddenDependency(RVMMethod source,
                                       CompiledMethod cm)
Record that the code currently being compiled (cm) must be invalidated if source is overridden.


addNoSubclassDependency

public void addNoSubclassDependency(RVMClass source,
                                    CompiledMethod cm)
Record that the code currently being compiled (cm) must be invalidated if source ever has a subclass.


handleOverriddenMethods

private void handleOverriddenMethods(RVMClass c)
Take action when a method is overridden.

Parameters:
c - a class that has just been loaded.

processOverride

private void processOverride(RVMMethod overridden)

handleSubclassing

private void handleSubclassing(RVMClass c)

invalidate

private void invalidate(CompiledMethod cm)
helper method to invalidate a particular compiled method


report

void report(String s)