< prev index next >

src/jdk.internal.vm.ci/share/classes/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotJVMCIRuntime.java

Print this page

  70 /**
  71  * HotSpot implementation of a JVMCI runtime.
  72  */
  73 public final class HotSpotJVMCIRuntime implements JVMCIRuntime {
  74 
  75     /**
  76      * Singleton instance lazily initialized via double-checked locking.
  77      */
  78     @NativeImageReinitialize private static volatile HotSpotJVMCIRuntime instance;
  79 
  80     private HotSpotResolvedObjectTypeImpl javaLangObject;
  81     private HotSpotResolvedObjectTypeImpl javaLangInvokeMethodHandle;
  82     private HotSpotResolvedObjectTypeImpl constantCallSiteType;
  83     private HotSpotResolvedObjectTypeImpl callSiteType;
  84     private HotSpotResolvedObjectTypeImpl javaLangString;
  85     private HotSpotResolvedObjectTypeImpl javaLangClass;
  86     private HotSpotResolvedObjectTypeImpl throwableType;
  87     private HotSpotResolvedObjectTypeImpl serializableType;
  88     private HotSpotResolvedObjectTypeImpl cloneableType;
  89     private HotSpotResolvedObjectTypeImpl enumType;

  90 
  91     HotSpotResolvedObjectTypeImpl getJavaLangObject() {
  92         if (javaLangObject == null) {
  93             javaLangObject = (HotSpotResolvedObjectTypeImpl) fromClass(Object.class);
  94         }
  95         return javaLangObject;
  96     }
  97 
  98     HotSpotResolvedObjectTypeImpl getJavaLangString() {
  99         if (javaLangString == null) {
 100             javaLangString = (HotSpotResolvedObjectTypeImpl) fromClass(String.class);
 101         }
 102         return javaLangString;
 103     }
 104 
 105     HotSpotResolvedObjectTypeImpl getJavaLangClass() {
 106         if (javaLangClass == null) {
 107             javaLangClass = (HotSpotResolvedObjectTypeImpl) fromClass(Class.class);
 108         }
 109         return javaLangClass;
 110     }
 111 
 112     HotSpotResolvedObjectTypeImpl getJavaLangCloneable() {
 113         if (cloneableType == null) {
 114             cloneableType = (HotSpotResolvedObjectTypeImpl) fromClass(Cloneable.class);
 115         }
 116         return cloneableType;
 117     }
 118 
 119     HotSpotResolvedObjectTypeImpl getJavaLangSerializable() {
 120         if (serializableType == null) {
 121             serializableType = (HotSpotResolvedObjectTypeImpl) fromClass(Serializable.class);
 122         }
 123         return serializableType;
 124     }
 125 







 126     HotSpotResolvedObjectTypeImpl getJavaLangThrowable() {
 127         if (throwableType == null) {
 128             throwableType = (HotSpotResolvedObjectTypeImpl) fromClass(Throwable.class);
 129         }
 130         return throwableType;
 131     }
 132 
 133     HotSpotResolvedObjectTypeImpl getJavaLangEnum() {
 134         if (enumType == null) {
 135             enumType = (HotSpotResolvedObjectTypeImpl) fromClass(Enum.class);
 136         }
 137         return enumType;
 138     }
 139 
 140     HotSpotResolvedObjectTypeImpl getConstantCallSite() {
 141         if (constantCallSiteType == null) {
 142             constantCallSiteType = (HotSpotResolvedObjectTypeImpl) fromClass(ConstantCallSite.class);
 143         }
 144         return constantCallSiteType;
 145     }

  70 /**
  71  * HotSpot implementation of a JVMCI runtime.
  72  */
  73 public final class HotSpotJVMCIRuntime implements JVMCIRuntime {
  74 
  75     /**
  76      * Singleton instance lazily initialized via double-checked locking.
  77      */
  78     @NativeImageReinitialize private static volatile HotSpotJVMCIRuntime instance;
  79 
  80     private HotSpotResolvedObjectTypeImpl javaLangObject;
  81     private HotSpotResolvedObjectTypeImpl javaLangInvokeMethodHandle;
  82     private HotSpotResolvedObjectTypeImpl constantCallSiteType;
  83     private HotSpotResolvedObjectTypeImpl callSiteType;
  84     private HotSpotResolvedObjectTypeImpl javaLangString;
  85     private HotSpotResolvedObjectTypeImpl javaLangClass;
  86     private HotSpotResolvedObjectTypeImpl throwableType;
  87     private HotSpotResolvedObjectTypeImpl serializableType;
  88     private HotSpotResolvedObjectTypeImpl cloneableType;
  89     private HotSpotResolvedObjectTypeImpl enumType;
  90     private HotSpotResolvedObjectTypeImpl identityObjectType;
  91 
  92     HotSpotResolvedObjectTypeImpl getJavaLangObject() {
  93         if (javaLangObject == null) {
  94             javaLangObject = (HotSpotResolvedObjectTypeImpl) fromClass(Object.class);
  95         }
  96         return javaLangObject;
  97     }
  98 
  99     HotSpotResolvedObjectTypeImpl getJavaLangString() {
 100         if (javaLangString == null) {
 101             javaLangString = (HotSpotResolvedObjectTypeImpl) fromClass(String.class);
 102         }
 103         return javaLangString;
 104     }
 105 
 106     HotSpotResolvedObjectTypeImpl getJavaLangClass() {
 107         if (javaLangClass == null) {
 108             javaLangClass = (HotSpotResolvedObjectTypeImpl) fromClass(Class.class);
 109         }
 110         return javaLangClass;
 111     }
 112 
 113     HotSpotResolvedObjectTypeImpl getJavaLangCloneable() {
 114         if (cloneableType == null) {
 115             cloneableType = (HotSpotResolvedObjectTypeImpl) fromClass(Cloneable.class);
 116         }
 117         return cloneableType;
 118     }
 119 
 120     HotSpotResolvedObjectTypeImpl getJavaLangSerializable() {
 121         if (serializableType == null) {
 122             serializableType = (HotSpotResolvedObjectTypeImpl) fromClass(Serializable.class);
 123         }
 124         return serializableType;
 125     }
 126 
 127     HotSpotResolvedObjectTypeImpl getJavaLangIdentityObject() {
 128         if (identityObjectType == null) {
 129             identityObjectType = (HotSpotResolvedObjectTypeImpl) fromClass(IdentityObject.class);
 130         }
 131         return identityObjectType;
 132     }
 133 
 134     HotSpotResolvedObjectTypeImpl getJavaLangThrowable() {
 135         if (throwableType == null) {
 136             throwableType = (HotSpotResolvedObjectTypeImpl) fromClass(Throwable.class);
 137         }
 138         return throwableType;
 139     }
 140 
 141     HotSpotResolvedObjectTypeImpl getJavaLangEnum() {
 142         if (enumType == null) {
 143             enumType = (HotSpotResolvedObjectTypeImpl) fromClass(Enum.class);
 144         }
 145         return enumType;
 146     }
 147 
 148     HotSpotResolvedObjectTypeImpl getConstantCallSite() {
 149         if (constantCallSiteType == null) {
 150             constantCallSiteType = (HotSpotResolvedObjectTypeImpl) fromClass(ConstantCallSite.class);
 151         }
 152         return constantCallSiteType;
 153     }
< prev index next >