|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.compilers.opt.specialization.SpecializationDatabase
public final class SpecializationDatabase
Database to store multiple specialized versions for a given method.
The overall design is very similar to that of the InvalidationDatabase (see InvalidationDatabase.java) In this database, the key is the RVMMethod object of the source method and the value is a method set. The method set is a list of specialized versions of the method pointed by the key. Specialized versions are represented by using the SpecializedMethod class. There is no provision for removing/deleting method versions as classes are never unloaded and the ClassLoader.compiledMethods[] is never cleaned.
Nested Class Summary | |
---|---|
(package private) static class |
SpecializationDatabase.MethodSet<T>
The following defines a set of methods that share a common "key" |
Field Summary | |
---|---|
private static HashSetRVM<SpecializedMethod> |
deferredMethods
|
private static boolean |
specializationInProgress
|
private static ImmutableEntryHashMapRVM<RVMMethod,SpecializationDatabase.MethodSet<RVMMethod>> |
specialVersionsHash
|
Constructor Summary | |
---|---|
SpecializationDatabase()
|
Method Summary | ||
---|---|---|
static void |
doDeferredSpecializations()
Drain the queue of methods waiting for specialized code generation. |
|
private static
|
findOrCreateMethodSet(ImmutableEntryHashMapRVM<T,SpecializationDatabase.MethodSet<T>> hash,
T key)
Look up the MethodSet corresponding to a given key in the database If none found, create one. |
|
(package private) static int |
getSpecialVersionCount(RVMMethod m)
|
|
(package private) static Iterator<SpecializedMethod> |
getSpecialVersions(RVMMethod m)
Return an iteration of SpecializedMethods that represents specialized compiled versions of the method pointed by RVMMethod |
|
private static void |
registerCompiledMethod(SpecializedMethod m)
|
|
(package private) static void |
registerSpecialVersion(SpecializedMethod spMethod)
Record a new specialized method in this database. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static boolean specializationInProgress
private static final HashSetRVM<SpecializedMethod> deferredMethods
private static final ImmutableEntryHashMapRVM<RVMMethod,SpecializationDatabase.MethodSet<RVMMethod>> specialVersionsHash
Constructor Detail |
---|
public SpecializationDatabase()
Method Detail |
---|
public static void doDeferredSpecializations()
private static void registerCompiledMethod(SpecializedMethod m)
static Iterator<SpecializedMethod> getSpecialVersions(RVMMethod m)
static int getSpecialVersionCount(RVMMethod m)
static void registerSpecialVersion(SpecializedMethod spMethod)
doDeferredSpecializations()
private static <T> SpecializationDatabase.MethodSet<T> findOrCreateMethodSet(ImmutableEntryHashMapRVM<T,SpecializationDatabase.MethodSet<T>> hash, T key)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |