1.1 --- a/src/share/vm/code/dependencies.cpp Tue Nov 08 10:31:53 2011 -0800 1.2 +++ b/src/share/vm/code/dependencies.cpp Tue Nov 08 17:29:57 2011 -0800 1.3 @@ -763,9 +763,14 @@ 1.4 // Method m is inherited into ctxk. 1.5 return true; 1.6 if (lm != NULL) { 1.7 - if (!(lm->is_public() || lm->is_protected())) 1.8 + if (!(lm->is_public() || lm->is_protected())) { 1.9 // Method is [package-]private, so the override story is complex. 1.10 return true; // Must punt the assertion to true. 1.11 + } 1.12 + if (lm->is_static()) { 1.13 + // Static methods don't override non-static so punt 1.14 + return true; 1.15 + } 1.16 if ( !Dependencies::is_concrete_method(lm) 1.17 && !Dependencies::is_concrete_method(m) 1.18 && Klass::cast(lm->method_holder())->is_subtype_of(m->method_holder())) 1.19 @@ -1091,9 +1096,11 @@ 1.20 } 1.21 1.22 bool Dependencies::is_concrete_method(methodOop m) { 1.23 - if (m->is_abstract()) return false; 1.24 - // %%% We could treat unexecuted methods as virtually abstract also. 1.25 - // This would require a deoptimization barrier on first execution. 1.26 + // Statics are irrelevant to virtual call sites. 1.27 + if (m->is_static()) return false; 1.28 + 1.29 + // We could also return false if m does not yet appear to be 1.30 + // executed, if the VM version supports this distinction also. 1.31 return !m->is_abstract(); 1.32 } 1.33 1.34 @@ -1113,7 +1120,7 @@ 1.35 1.36 bool Dependencies::is_concrete_klass(ciInstanceKlass* k) { 1.37 if (k->is_abstract()) return false; 1.38 - // We could return also false if k does not yet appear to be 1.39 + // We could also return false if k does not yet appear to be 1.40 // instantiated, if the VM version supports this distinction also. 1.41 //if (k->is_not_instantiated()) return false; 1.42 return true; 1.43 @@ -1123,7 +1130,7 @@ 1.44 // Statics are irrelevant to virtual call sites. 1.45 if (m->is_static()) return false; 1.46 1.47 - // We could return also false if m does not yet appear to be 1.48 + // We could also return false if m does not yet appear to be 1.49 // executed, if the VM version supports this distinction also. 1.50 return !m->is_abstract(); 1.51 }