comparison src/share/vm/classfile/systemDictionary.hpp @ 1142:4ce7240d622c

6914300: ciEnv should export all well known classes Reviewed-by: kvn, twisti
author never
date Wed, 06 Jan 2010 14:22:39 -0800
parents e66fd840cb6b
children cd37471eaecc
comparison
equal deleted inserted replaced
1140:1f6d42899c3a 1142:4ce7240d622c
80 // The order of these definitions is significant; it is the order in which 80 // The order of these definitions is significant; it is the order in which
81 // preloading is actually performed by initialize_preloaded_classes. 81 // preloading is actually performed by initialize_preloaded_classes.
82 82
83 #define WK_KLASSES_DO(template) \ 83 #define WK_KLASSES_DO(template) \
84 /* well-known classes */ \ 84 /* well-known classes */ \
85 template(object_klass, java_lang_Object, Pre) \ 85 template(Object_klass, java_lang_Object, Pre) \
86 template(string_klass, java_lang_String, Pre) \ 86 template(String_klass, java_lang_String, Pre) \
87 template(class_klass, java_lang_Class, Pre) \ 87 template(Class_klass, java_lang_Class, Pre) \
88 template(cloneable_klass, java_lang_Cloneable, Pre) \ 88 template(Cloneable_klass, java_lang_Cloneable, Pre) \
89 template(classloader_klass, java_lang_ClassLoader, Pre) \ 89 template(ClassLoader_klass, java_lang_ClassLoader, Pre) \
90 template(serializable_klass, java_io_Serializable, Pre) \ 90 template(Serializable_klass, java_io_Serializable, Pre) \
91 template(system_klass, java_lang_System, Pre) \ 91 template(System_klass, java_lang_System, Pre) \
92 template(throwable_klass, java_lang_Throwable, Pre) \ 92 template(Throwable_klass, java_lang_Throwable, Pre) \
93 template(error_klass, java_lang_Error, Pre) \ 93 template(Error_klass, java_lang_Error, Pre) \
94 template(threaddeath_klass, java_lang_ThreadDeath, Pre) \ 94 template(ThreadDeath_klass, java_lang_ThreadDeath, Pre) \
95 template(exception_klass, java_lang_Exception, Pre) \ 95 template(Exception_klass, java_lang_Exception, Pre) \
96 template(runtime_exception_klass, java_lang_RuntimeException, Pre) \ 96 template(RuntimeException_klass, java_lang_RuntimeException, Pre) \
97 template(protectionDomain_klass, java_security_ProtectionDomain, Pre) \ 97 template(ProtectionDomain_klass, java_security_ProtectionDomain, Pre) \
98 template(AccessControlContext_klass, java_security_AccessControlContext, Pre) \ 98 template(AccessControlContext_klass, java_security_AccessControlContext, Pre) \
99 template(classNotFoundException_klass, java_lang_ClassNotFoundException, Pre) \ 99 template(ClassNotFoundException_klass, java_lang_ClassNotFoundException, Pre) \
100 template(noClassDefFoundError_klass, java_lang_NoClassDefFoundError, Pre) \ 100 template(NoClassDefFoundError_klass, java_lang_NoClassDefFoundError, Pre) \
101 template(linkageError_klass, java_lang_LinkageError, Pre) \ 101 template(LinkageError_klass, java_lang_LinkageError, Pre) \
102 template(ClassCastException_klass, java_lang_ClassCastException, Pre) \ 102 template(ClassCastException_klass, java_lang_ClassCastException, Pre) \
103 template(ArrayStoreException_klass, java_lang_ArrayStoreException, Pre) \ 103 template(ArrayStoreException_klass, java_lang_ArrayStoreException, Pre) \
104 template(virtualMachineError_klass, java_lang_VirtualMachineError, Pre) \ 104 template(VirtualMachineError_klass, java_lang_VirtualMachineError, Pre) \
105 template(OutOfMemoryError_klass, java_lang_OutOfMemoryError, Pre) \ 105 template(OutOfMemoryError_klass, java_lang_OutOfMemoryError, Pre) \
106 template(StackOverflowError_klass, java_lang_StackOverflowError, Pre) \ 106 template(StackOverflowError_klass, java_lang_StackOverflowError, Pre) \
107 template(IllegalMonitorStateException_klass, java_lang_IllegalMonitorStateException, Pre) \ 107 template(IllegalMonitorStateException_klass, java_lang_IllegalMonitorStateException, Pre) \
108 template(reference_klass, java_lang_ref_Reference, Pre) \ 108 template(Reference_klass, java_lang_ref_Reference, Pre) \
109 \ 109 \
110 /* Preload ref klasses and set reference types */ \ 110 /* Preload ref klasses and set reference types */ \
111 template(soft_reference_klass, java_lang_ref_SoftReference, Pre) \ 111 template(SoftReference_klass, java_lang_ref_SoftReference, Pre) \
112 template(weak_reference_klass, java_lang_ref_WeakReference, Pre) \ 112 template(WeakReference_klass, java_lang_ref_WeakReference, Pre) \
113 template(final_reference_klass, java_lang_ref_FinalReference, Pre) \ 113 template(FinalReference_klass, java_lang_ref_FinalReference, Pre) \
114 template(phantom_reference_klass, java_lang_ref_PhantomReference, Pre) \ 114 template(PhantomReference_klass, java_lang_ref_PhantomReference, Pre) \
115 template(finalizer_klass, java_lang_ref_Finalizer, Pre) \ 115 template(Finalizer_klass, java_lang_ref_Finalizer, Pre) \
116 \ 116 \
117 template(thread_klass, java_lang_Thread, Pre) \ 117 template(Thread_klass, java_lang_Thread, Pre) \
118 template(threadGroup_klass, java_lang_ThreadGroup, Pre) \ 118 template(ThreadGroup_klass, java_lang_ThreadGroup, Pre) \
119 template(properties_klass, java_util_Properties, Pre) \ 119 template(Properties_klass, java_util_Properties, Pre) \
120 template(reflect_accessible_object_klass, java_lang_reflect_AccessibleObject, Pre) \ 120 template(reflect_AccessibleObject_klass, java_lang_reflect_AccessibleObject, Pre) \
121 template(reflect_field_klass, java_lang_reflect_Field, Pre) \ 121 template(reflect_Field_klass, java_lang_reflect_Field, Pre) \
122 template(reflect_method_klass, java_lang_reflect_Method, Pre) \ 122 template(reflect_Method_klass, java_lang_reflect_Method, Pre) \
123 template(reflect_constructor_klass, java_lang_reflect_Constructor, Pre) \ 123 template(reflect_Constructor_klass, java_lang_reflect_Constructor, Pre) \
124 \ 124 \
125 /* NOTE: needed too early in bootstrapping process to have checks based on JDK version */ \ 125 /* NOTE: needed too early in bootstrapping process to have checks based on JDK version */ \
126 /* Universe::is_gte_jdk14x_version() is not set up by this point. */ \ 126 /* Universe::is_gte_jdk14x_version() is not set up by this point. */ \
127 /* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \ 127 /* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \
128 template(reflect_magic_klass, sun_reflect_MagicAccessorImpl, Opt) \ 128 template(reflect_MagicAccessorImpl_klass, sun_reflect_MagicAccessorImpl, Opt) \
129 template(reflect_method_accessor_klass, sun_reflect_MethodAccessorImpl, Opt_Only_JDK14NewRef) \ 129 template(reflect_MethodAccessorImpl_klass, sun_reflect_MethodAccessorImpl, Opt_Only_JDK14NewRef) \
130 template(reflect_constructor_accessor_klass, sun_reflect_ConstructorAccessorImpl, Opt_Only_JDK14NewRef) \ 130 template(reflect_ConstructorAccessorImpl_klass, sun_reflect_ConstructorAccessorImpl, Opt_Only_JDK14NewRef) \
131 template(reflect_delegating_classloader_klass, sun_reflect_DelegatingClassLoader, Opt) \ 131 template(reflect_DelegatingClassLoader_klass, sun_reflect_DelegatingClassLoader, Opt) \
132 template(reflect_constant_pool_klass, sun_reflect_ConstantPool, Opt_Only_JDK15) \ 132 template(reflect_ConstantPool_klass, sun_reflect_ConstantPool, Opt_Only_JDK15) \
133 template(reflect_unsafe_static_field_accessor_impl_klass, sun_reflect_UnsafeStaticFieldAccessorImpl, Opt_Only_JDK15) \ 133 template(reflect_UnsafeStaticFieldAccessorImpl_klass, sun_reflect_UnsafeStaticFieldAccessorImpl, Opt_Only_JDK15) \
134 \ 134 \
135 /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \ 135 /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \
136 template(MethodHandle_klass, java_dyn_MethodHandle, Opt) \ 136 template(MethodHandle_klass, java_dyn_MethodHandle, Opt) \
137 template(MemberName_klass, sun_dyn_MemberName, Opt) \ 137 template(MemberName_klass, sun_dyn_MemberName, Opt) \
138 template(MethodHandleImpl_klass, sun_dyn_MethodHandleImpl, Opt) \ 138 template(MethodHandleImpl_klass, sun_dyn_MethodHandleImpl, Opt) \
145 template(Linkage_klass, java_dyn_Linkage, Opt) \ 145 template(Linkage_klass, java_dyn_Linkage, Opt) \
146 template(CallSite_klass, java_dyn_CallSite, Opt) \ 146 template(CallSite_klass, java_dyn_CallSite, Opt) \
147 template(InvokeDynamic_klass, java_dyn_InvokeDynamic, Opt) \ 147 template(InvokeDynamic_klass, java_dyn_InvokeDynamic, Opt) \
148 /* Note: MethodHandle must be first, and Dynamic last in group */ \ 148 /* Note: MethodHandle must be first, and Dynamic last in group */ \
149 \ 149 \
150 template(vector_klass, java_util_Vector, Pre) \ 150 template(StringBuffer_klass, java_lang_StringBuffer, Pre) \
151 template(hashtable_klass, java_util_Hashtable, Pre) \
152 template(stringBuffer_klass, java_lang_StringBuffer, Pre) \
153 template(StringBuilder_klass, java_lang_StringBuilder, Pre) \ 151 template(StringBuilder_klass, java_lang_StringBuilder, Pre) \
154 \ 152 \
155 /* It's NULL in non-1.4 JDKs. */ \ 153 /* It's NULL in non-1.4 JDKs. */ \
156 template(stackTraceElement_klass, java_lang_StackTraceElement, Opt) \ 154 template(StackTraceElement_klass, java_lang_StackTraceElement, Opt) \
157 /* Universe::is_gte_jdk14x_version() is not set up by this point. */ \ 155 /* Universe::is_gte_jdk14x_version() is not set up by this point. */ \
158 /* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \ 156 /* It's okay if this turns out to be NULL in non-1.4 JDKs. */ \
159 template(java_nio_Buffer_klass, java_nio_Buffer, Opt) \ 157 template(java_nio_Buffer_klass, java_nio_Buffer, Opt) \
160 \ 158 \
161 /* If this class isn't present, it won't be referenced. */ \ 159 /* If this class isn't present, it won't be referenced. */ \
162 template(sun_misc_AtomicLongCSImpl_klass, sun_misc_AtomicLongCSImpl, Opt) \ 160 template(sun_misc_AtomicLongCSImpl_klass, sun_misc_AtomicLongCSImpl, Opt) \
163 \ 161 \
164 template(sun_jkernel_DownloadManager_klass, sun_jkernel_DownloadManager, Opt_Kernel) \ 162 template(sun_jkernel_DownloadManager_klass, sun_jkernel_DownloadManager, Opt_Kernel) \
165 \ 163 \
166 /* Preload boxing klasses */ \ 164 /* Preload boxing klasses */ \
167 template(boolean_klass, java_lang_Boolean, Pre) \ 165 template(Boolean_klass, java_lang_Boolean, Pre) \
168 template(char_klass, java_lang_Character, Pre) \ 166 template(Character_klass, java_lang_Character, Pre) \
169 template(float_klass, java_lang_Float, Pre) \ 167 template(Float_klass, java_lang_Float, Pre) \
170 template(double_klass, java_lang_Double, Pre) \ 168 template(Double_klass, java_lang_Double, Pre) \
171 template(byte_klass, java_lang_Byte, Pre) \ 169 template(Byte_klass, java_lang_Byte, Pre) \
172 template(short_klass, java_lang_Short, Pre) \ 170 template(Short_klass, java_lang_Short, Pre) \
173 template(int_klass, java_lang_Integer, Pre) \ 171 template(Integer_klass, java_lang_Integer, Pre) \
174 template(long_klass, java_lang_Long, Pre) \ 172 template(Long_klass, java_lang_Long, Pre) \
175 /*end*/ 173 /*end*/
176 174
177 175
178 class SystemDictionary : AllStatic { 176 class SystemDictionary : AllStatic {
179 friend class VMStructs; 177 friend class VMStructs;
436 434
437 public: 435 public:
438 // Tells whether ClassLoader.checkPackageAccess is present 436 // Tells whether ClassLoader.checkPackageAccess is present
439 static bool has_checkPackageAccess() { return _has_checkPackageAccess; } 437 static bool has_checkPackageAccess() { return _has_checkPackageAccess; }
440 438
441 static bool class_klass_loaded() { return WK_KLASS(class_klass) != NULL; } 439 static bool Class_klass_loaded() { return WK_KLASS(Class_klass) != NULL; }
442 static bool cloneable_klass_loaded() { return WK_KLASS(cloneable_klass) != NULL; } 440 static bool Cloneable_klass_loaded() { return WK_KLASS(Cloneable_klass) != NULL; }
443 441
444 // Returns default system loader 442 // Returns default system loader
445 static oop java_system_loader(); 443 static oop java_system_loader();
446 444
447 // Compute the default system loader 445 // Compute the default system loader