8235956: Remove javaClasses offset tests
Reviewed-by: dholmes, coleenp
This commit is contained in:
parent
5e85366785
commit
820e1a7e14
@ -1399,10 +1399,8 @@ void java_lang_Class::set_signers(oop java_class, objArrayOop signers) {
|
|||||||
|
|
||||||
|
|
||||||
void java_lang_Class::set_class_loader(oop java_class, oop loader) {
|
void java_lang_Class::set_class_loader(oop java_class, oop loader) {
|
||||||
// jdk7 runs Queens in bootstrapping and jdk8-9 has no coordinated pushes yet.
|
assert(_class_loader_offset != 0, "offsets should have been initialized");
|
||||||
if (_class_loader_offset != 0) {
|
java_class->obj_field_put(_class_loader_offset, loader);
|
||||||
java_class->obj_field_put(_class_loader_offset, loader);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
oop java_lang_Class::class_loader(oop java_class) {
|
oop java_lang_Class::class_loader(oop java_class) {
|
||||||
@ -1633,20 +1631,12 @@ void java_lang_Class::serialize_offsets(SerializeClosure* f) {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
int java_lang_Class::classRedefinedCount(oop the_class_mirror) {
|
int java_lang_Class::classRedefinedCount(oop the_class_mirror) {
|
||||||
if (classRedefinedCount_offset == -1) {
|
assert(classRedefinedCount_offset != -1, "offsets should have been initialized");
|
||||||
// If we don't have an offset for it then just return -1 as a marker.
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
return the_class_mirror->int_field(classRedefinedCount_offset);
|
return the_class_mirror->int_field(classRedefinedCount_offset);
|
||||||
}
|
}
|
||||||
|
|
||||||
void java_lang_Class::set_classRedefinedCount(oop the_class_mirror, int value) {
|
void java_lang_Class::set_classRedefinedCount(oop the_class_mirror, int value) {
|
||||||
if (classRedefinedCount_offset == -1) {
|
assert(classRedefinedCount_offset != -1, "offsets should have been initialized");
|
||||||
// If we don't have an offset for it then nothing to set.
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
the_class_mirror->int_field_put(classRedefinedCount_offset, value);
|
the_class_mirror->int_field_put(classRedefinedCount_offset, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4044,6 +4034,7 @@ void java_security_AccessControlContext::serialize_offsets(SerializeClosure* f)
|
|||||||
|
|
||||||
oop java_security_AccessControlContext::create(objArrayHandle context, bool isPrivileged, Handle privileged_context, TRAPS) {
|
oop java_security_AccessControlContext::create(objArrayHandle context, bool isPrivileged, Handle privileged_context, TRAPS) {
|
||||||
assert(_isPrivileged_offset != 0, "offsets should have been initialized");
|
assert(_isPrivileged_offset != 0, "offsets should have been initialized");
|
||||||
|
assert(_isAuthorized_offset != -1, "offsets should have been initialized");
|
||||||
// Ensure klass is initialized
|
// Ensure klass is initialized
|
||||||
SystemDictionary::AccessControlContext_klass()->initialize(CHECK_0);
|
SystemDictionary::AccessControlContext_klass()->initialize(CHECK_0);
|
||||||
// Allocate result
|
// Allocate result
|
||||||
@ -4052,10 +4043,8 @@ oop java_security_AccessControlContext::create(objArrayHandle context, bool isPr
|
|||||||
result->obj_field_put(_context_offset, context());
|
result->obj_field_put(_context_offset, context());
|
||||||
result->obj_field_put(_privilegedContext_offset, privileged_context());
|
result->obj_field_put(_privilegedContext_offset, privileged_context());
|
||||||
result->bool_field_put(_isPrivileged_offset, isPrivileged);
|
result->bool_field_put(_isPrivileged_offset, isPrivileged);
|
||||||
// whitelist AccessControlContexts created by the JVM if present
|
// whitelist AccessControlContexts created by the JVM
|
||||||
if (_isAuthorized_offset != -1) {
|
result->bool_field_put(_isAuthorized_offset, true);
|
||||||
result->bool_field_put(_isAuthorized_offset, true);
|
|
||||||
}
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4159,10 +4148,7 @@ bool java_lang_ClassLoader::is_instance(oop obj) {
|
|||||||
// based on non-null field
|
// based on non-null field
|
||||||
// Written to by java.lang.ClassLoader, vm only reads this field, doesn't set it
|
// Written to by java.lang.ClassLoader, vm only reads this field, doesn't set it
|
||||||
bool java_lang_ClassLoader::parallelCapable(oop class_loader) {
|
bool java_lang_ClassLoader::parallelCapable(oop class_loader) {
|
||||||
if (parallelCapable_offset == -1) {
|
assert(parallelCapable_offset != -1, "offsets should have been initialized");
|
||||||
// Default for backward compatibility is false
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return (class_loader->obj_field(parallelCapable_offset) != NULL);
|
return (class_loader->obj_field(parallelCapable_offset) != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user