8137058: Clear out all non-Critical APIs from sun.reflect

Reviewed-by: alanb, jfranck, mchung
This commit is contained in:
Chris Hegarty 2016-04-15 16:19:15 +01:00
parent 76e228d3db
commit 00f6a09302
23 changed files with 77 additions and 71 deletions

View file

@ -2750,7 +2750,7 @@ void java_lang_reflect_Field::set_type_annotations(oop field, oop value) {
field->obj_field_put(type_annotations_offset, value);
}
void sun_reflect_ConstantPool::compute_offsets() {
void reflect_ConstantPool::compute_offsets() {
Klass* k = SystemDictionary::reflect_ConstantPool_klass();
// This null test can be removed post beta
if (k != NULL) {
@ -2894,7 +2894,7 @@ void java_lang_reflect_Module::set_module_entry(oop module, ModuleEntry* module_
module->address_field_put(_module_entry_offset, (address)module_entry);
}
Handle sun_reflect_ConstantPool::create(TRAPS) {
Handle reflect_ConstantPool::create(TRAPS) {
assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem");
Klass* k = SystemDictionary::reflect_ConstantPool_klass();
instanceKlassHandle klass (THREAD, k);
@ -2904,14 +2904,14 @@ Handle sun_reflect_ConstantPool::create(TRAPS) {
}
void sun_reflect_ConstantPool::set_cp(oop reflect, ConstantPool* value) {
void reflect_ConstantPool::set_cp(oop reflect, ConstantPool* value) {
assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem");
oop mirror = value->pool_holder()->java_mirror();
// Save the mirror to get back the constant pool.
reflect->obj_field_put(_oop_offset, mirror);
}
ConstantPool* sun_reflect_ConstantPool::get_cp(oop reflect) {
ConstantPool* reflect_ConstantPool::get_cp(oop reflect) {
assert(Universe::is_fully_initialized(), "Need to find another solution to the reflection problem");
oop mirror = reflect->obj_field(_oop_offset);
@ -2926,7 +2926,7 @@ ConstantPool* sun_reflect_ConstantPool::get_cp(oop reflect) {
return InstanceKlass::cast(k)->constants();
}
void sun_reflect_UnsafeStaticFieldAccessorImpl::compute_offsets() {
void reflect_UnsafeStaticFieldAccessorImpl::compute_offsets() {
Klass* k = SystemDictionary::reflect_UnsafeStaticFieldAccessorImpl_klass();
// This null test can be removed post beta
if (k != NULL) {
@ -3706,8 +3706,8 @@ int java_lang_AssertionStatusDirectives::packageEnabled_offset;
int java_lang_AssertionStatusDirectives::deflt_offset;
int java_nio_Buffer::_limit_offset;
int java_util_concurrent_locks_AbstractOwnableSynchronizer::_owner_offset = 0;
int sun_reflect_ConstantPool::_oop_offset;
int sun_reflect_UnsafeStaticFieldAccessorImpl::_base_offset;
int reflect_ConstantPool::_oop_offset;
int reflect_UnsafeStaticFieldAccessorImpl::_base_offset;
// Support for java_lang_StackTraceElement
@ -3912,8 +3912,8 @@ void JavaClasses::compute_offsets() {
java_lang_reflect_Constructor::compute_offsets();
java_lang_reflect_Field::compute_offsets();
java_nio_Buffer::compute_offsets();
sun_reflect_ConstantPool::compute_offsets();
sun_reflect_UnsafeStaticFieldAccessorImpl::compute_offsets();
reflect_ConstantPool::compute_offsets();
reflect_UnsafeStaticFieldAccessorImpl::compute_offsets();
java_lang_reflect_Parameter::compute_offsets();
java_lang_reflect_Module::compute_offsets();
java_lang_StackFrameInfo::compute_offsets();