src/share/vm/code/dependencies.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/code/dependencies.cpp Mon Oct 31 15:43:37 2011
--- new/src/share/vm/code/dependencies.cpp Mon Oct 31 15:43:37 2011
*** 764,773 ****
--- 764,777 ----
return true;
if (lm != NULL) {
if (!(lm->is_public() || lm->is_protected()))
// Method is [package-]private, so the override story is complex.
return true; // Must punt the assertion to true.
+ if (lm->is_static()) {
+ // Static methods don't override non-static so punt
+ return true;
+ }
if ( !Dependencies::is_concrete_method(lm)
&& !Dependencies::is_concrete_method(m)
&& Klass::cast(lm->method_holder())->is_subtype_of(m->method_holder()))
// Method m is overridden by lm, but both are non-concrete.
return true;
*** 1089,1101 ****
--- 1093,1107 ----
//if (k->is_not_instantiated()) return false;
return true;
}
bool Dependencies::is_concrete_method(methodOop m) {
if (m->is_abstract()) return false;
// %%% We could treat unexecuted methods as virtually abstract also.
// This would require a deoptimization barrier on first execution.
+ // Statics are irrelevant to virtual call sites.
+ if (m->is_static()) return false;
+
+ // We could also return false if m does not yet appear to be
+ // executed, if the VM version supports this distinction also.
return !m->is_abstract();
}
Klass* Dependencies::find_finalizable_subclass(Klass* k) {
*** 1111,1131 ****
--- 1117,1137 ----
}
bool Dependencies::is_concrete_klass(ciInstanceKlass* k) {
if (k->is_abstract()) return false;
! // We could return also false if k does not yet appear to be
! // We could also return false if k does not yet appear to be
// instantiated, if the VM version supports this distinction also.
//if (k->is_not_instantiated()) return false;
return true;
}
bool Dependencies::is_concrete_method(ciMethod* m) {
// Statics are irrelevant to virtual call sites.
if (m->is_static()) return false;
! // We could return also false if m does not yet appear to be
! // We could also return false if m does not yet appear to be
// executed, if the VM version supports this distinction also.
return !m->is_abstract();
}
src/share/vm/code/dependencies.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File