2091
2092 _box_klasses[T_BOOLEAN] = WK_KLASS(Boolean_klass);
2093 _box_klasses[T_CHAR] = WK_KLASS(Character_klass);
2094 _box_klasses[T_FLOAT] = WK_KLASS(Float_klass);
2095 _box_klasses[T_DOUBLE] = WK_KLASS(Double_klass);
2096 _box_klasses[T_BYTE] = WK_KLASS(Byte_klass);
2097 _box_klasses[T_SHORT] = WK_KLASS(Short_klass);
2098 _box_klasses[T_INT] = WK_KLASS(Integer_klass);
2099 _box_klasses[T_LONG] = WK_KLASS(Long_klass);
2100 //_box_klasses[T_OBJECT] = WK_KLASS(object_klass);
2101 //_box_klasses[T_ARRAY] = WK_KLASS(object_klass);
2102
2103 { // Compute whether we should use checkPackageAccess or NOT
2104 Method* method = InstanceKlass::cast(ClassLoader_klass())->find_method(vmSymbols::checkPackageAccess_name(), vmSymbols::class_protectiondomain_signature());
2105 _has_checkPackageAccess = (method != NULL);
2106 }
2107
2108 if (UseSharedSpaces) {
2109 assert(JvmtiEnvBase::get_phase() <= JVMTI_PHASE_PRIMORDIAL,
2110 "All well known classes must be resolved in JVMTI_PHASE_PRIMORDIAL or before");
2111 for (int i=FIRST_WKID; i<last; i++) {
2112 InstanceKlass* k = _well_known_klasses[i];
2113 assert(k->is_shared(), "must not be replaced by JVMTI class file load hook");
2114 }
2115 }
2116 }
2117
2118 // Tells if a given klass is a box (wrapper class, such as java.lang.Integer).
2119 // If so, returns the basic type it holds. If not, returns T_OBJECT.
2120 BasicType SystemDictionary::box_klass_type(Klass* k) {
2121 assert(k != NULL, "");
2122 for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
2123 if (_box_klasses[i] == k)
2124 return (BasicType)i;
2125 }
2126 return T_OBJECT;
2127 }
2128
2129 // Constraints on class loaders. The details of the algorithm can be
2130 // found in the OOPSLA'98 paper "Dynamic Class Loading in the Java
2131 // Virtual Machine" by Sheng Liang and Gilad Bracha. The basic idea is
|
2091
2092 _box_klasses[T_BOOLEAN] = WK_KLASS(Boolean_klass);
2093 _box_klasses[T_CHAR] = WK_KLASS(Character_klass);
2094 _box_klasses[T_FLOAT] = WK_KLASS(Float_klass);
2095 _box_klasses[T_DOUBLE] = WK_KLASS(Double_klass);
2096 _box_klasses[T_BYTE] = WK_KLASS(Byte_klass);
2097 _box_klasses[T_SHORT] = WK_KLASS(Short_klass);
2098 _box_klasses[T_INT] = WK_KLASS(Integer_klass);
2099 _box_klasses[T_LONG] = WK_KLASS(Long_klass);
2100 //_box_klasses[T_OBJECT] = WK_KLASS(object_klass);
2101 //_box_klasses[T_ARRAY] = WK_KLASS(object_klass);
2102
2103 { // Compute whether we should use checkPackageAccess or NOT
2104 Method* method = InstanceKlass::cast(ClassLoader_klass())->find_method(vmSymbols::checkPackageAccess_name(), vmSymbols::class_protectiondomain_signature());
2105 _has_checkPackageAccess = (method != NULL);
2106 }
2107
2108 if (UseSharedSpaces) {
2109 assert(JvmtiEnvBase::get_phase() <= JVMTI_PHASE_PRIMORDIAL,
2110 "All well known classes must be resolved in JVMTI_PHASE_PRIMORDIAL or before");
2111 for (int i = FIRST_WKID; i < last; i++) {
2112 InstanceKlass* k = _well_known_klasses[i];
2113 assert(k->is_shared(), "must not be replaced by JVMTI class file load hook");
2114 }
2115 }
2116 }
2117
2118 // Tells if a given klass is a box (wrapper class, such as java.lang.Integer).
2119 // If so, returns the basic type it holds. If not, returns T_OBJECT.
2120 BasicType SystemDictionary::box_klass_type(Klass* k) {
2121 assert(k != NULL, "");
2122 for (int i = T_BOOLEAN; i < T_VOID+1; i++) {
2123 if (_box_klasses[i] == k)
2124 return (BasicType)i;
2125 }
2126 return T_OBJECT;
2127 }
2128
2129 // Constraints on class loaders. The details of the algorithm can be
2130 // found in the OOPSLA'98 paper "Dynamic Class Loading in the Java
2131 // Virtual Machine" by Sheng Liang and Gilad Bracha. The basic idea is
|