8000725: NPG: method_holder() and pool_holder() and pool_holder field should be InstanceKlass

Change types of above methods and field to InstanceKlass and remove unneeded casts from the source files.

Reviewed-by: dholmes, coleenp, zgu
This commit is contained in:
Harold Seigel 2012-11-06 15:09:37 -05:00 committed by Coleen Phillimore
parent e1d995ab86
commit 7fee66f152
39 changed files with 176 additions and 179 deletions

View file

@ -1051,7 +1051,7 @@ void CompileBroker::compile_method_base(methodHandle method,
guarantee(!method->is_abstract(), "cannot compile abstract methods");
assert(method->method_holder()->oop_is_instance(),
"sanity check");
assert(!InstanceKlass::cast(method->method_holder())->is_not_initialized(),
assert(!method->method_holder()->is_not_initialized(),
"method holder must be initialized");
assert(!method->is_method_handle_intrinsic(), "do not enqueue these guys");
@ -1206,7 +1206,7 @@ nmethod* CompileBroker::compile_method(methodHandle method, int osr_bci,
assert(method->method_holder()->oop_is_instance(), "not an instance method");
assert(osr_bci == InvocationEntryBci || (0 <= osr_bci && osr_bci < method->code_size()), "bci out of range");
assert(!method->is_abstract() && (osr_bci == InvocationEntryBci || !method->is_native()), "cannot compile abstract/native methods");
assert(!InstanceKlass::cast(method->method_holder())->is_not_initialized(), "method holder must be initialized");
assert(!method->method_holder()->is_not_initialized(), "method holder must be initialized");
if (!TieredCompilation) {
comp_level = CompLevel_highest_tier;

View file

@ -67,7 +67,7 @@ class MethodMatcher : public CHeapObj<mtCompiler> {
// utility method
MethodMatcher* find(methodHandle method) {
Symbol* class_name = Klass::cast(method->method_holder())->name();
Symbol* class_name = method->method_holder()->name();
Symbol* method_name = method->name();
for (MethodMatcher* current = this; current != NULL; current = current->_next) {
if (match(class_name, current->class_name(), current->_class_mode) &&
@ -624,7 +624,7 @@ void CompilerOracle::append_exclude_to_file(methodHandle method) {
assert(has_command_file(), "command file must be specified");
fileStream stream(fopen(cc_file(), "at"));
stream.print("exclude ");
Klass::cast(method->method_holder())->name()->print_symbol_on(&stream);
method->method_holder()->name()->print_symbol_on(&stream);
stream.print(".");
method->name()->print_symbol_on(&stream);
method->signature()->print_symbol_on(&stream);