This commit is contained in:
Bob Vandette 2017-02-24 12:41:26 -05:00
commit 929fc23c45
250 changed files with 6022 additions and 3870 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -834,7 +834,7 @@ void ClassFileParser::parse_interfaces(const ClassFileStream* const stream,
const Klass* const k =
SystemDictionary::resolve_super_or_fail(_class_name,
unresolved_klass,
_loader_data->class_loader(),
Handle(THREAD, _loader_data->class_loader()),
_protection_domain,
false,
CHECK);
@ -2858,7 +2858,6 @@ void ClassFileParser::parse_methods(const ClassFileStream* const cfs,
NULL,
CHECK);
HandleMark hm(THREAD);
for (int index = 0; index < length; index++) {
Method* method = parse_method(cfs,
is_interface,
@ -4382,10 +4381,12 @@ static void check_super_class_access(const InstanceKlass* this_klass, TRAPS) {
}
Reflection::VerifyClassAccessResults vca_result =
Reflection::verify_class_access(this_klass, super, false);
Reflection::verify_class_access(this_klass, InstanceKlass::cast(super), false);
if (vca_result != Reflection::ACCESS_OK) {
ResourceMark rm(THREAD);
char* msg = Reflection::verify_class_access_msg(this_klass, super, vca_result);
char* msg = Reflection::verify_class_access_msg(this_klass,
InstanceKlass::cast(super),
vca_result);
if (msg == NULL) {
Exceptions::fthrow(
THREAD_AND_LOCATION,
@ -4414,10 +4415,12 @@ static void check_super_interface_access(const InstanceKlass* this_klass, TRAPS)
Klass* const k = local_interfaces->at(i);
assert (k != NULL && k->is_interface(), "invalid interface");
Reflection::VerifyClassAccessResults vca_result =
Reflection::verify_class_access(this_klass, k, false);
Reflection::verify_class_access(this_klass, InstanceKlass::cast(k), false);
if (vca_result != Reflection::ACCESS_OK) {
ResourceMark rm(THREAD);
char* msg = Reflection::verify_class_access_msg(this_klass, k, vca_result);
char* msg = Reflection::verify_class_access_msg(this_klass,
InstanceKlass::cast(k),
vca_result);
if (msg == NULL) {
Exceptions::fthrow(
THREAD_AND_LOCATION,
@ -5361,7 +5364,7 @@ void ClassFileParser::fill_instance_klass(InstanceKlass* ik, bool changed_by_loa
// Allocate mirror and initialize static fields
// The create_mirror() call will also call compute_modifiers()
java_lang_Class::create_mirror(ik,
_loader_data->class_loader(),
Handle(THREAD, _loader_data->class_loader()),
module_handle,
_protection_domain,
CHECK);
@ -5919,10 +5922,11 @@ void ClassFileParser::post_process_parsed_stream(const ClassFileStream* const st
"Interfaces must have java.lang.Object as superclass in class file %s",
CHECK);
}
Handle loader(THREAD, _loader_data->class_loader());
_super_klass = (const InstanceKlass*)
SystemDictionary::resolve_super_or_fail(_class_name,
super_class_name,
_loader_data->class_loader(),
loader,
_protection_domain,
true,
CHECK);
@ -5964,6 +5968,7 @@ void ClassFileParser::post_process_parsed_stream(const ClassFileStream* const st
_all_mirandas = new GrowableArray<Method*>(20);
Handle loader(THREAD, _loader_data->class_loader());
klassVtable::compute_vtable_size_and_num_mirandas(&_vtable_size,
&_num_miranda_methods,
_all_mirandas,
@ -5971,7 +5976,7 @@ void ClassFileParser::post_process_parsed_stream(const ClassFileStream* const st
_methods,
_access_flags,
_major_version,
_loader_data->class_loader(),
loader,
_class_name,
_local_interfaces,
CHECK);