src/share/vm/oops/method.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
*** old/src/share/vm/oops/method.cpp Mon Aug 19 07:39:08 2013
--- new/src/share/vm/oops/method.cpp Mon Aug 19 07:39:07 2013
*** 507,534 ****
--- 507,540 ----
}
_access_flags.set_loops_flag_init();
return _access_flags.has_loops();
}
bool Method::is_final_method() const {
+ bool Method::is_final_method(AccessFlags class_access_flags) const {
// %%% Should return true for private methods also,
// since there is no way to override them.
return is_final() || method_holder()->is_final();
+ if (is_overpass()) return false; // can this happen?
+ return is_final() || class_access_flags.is_final();
}
bool Method::is_strict_method() const {
return is_strict();
+ bool Method::is_final_method() const {
+ return is_final_method(method_holder()->access_flags());
}
bool Method::can_be_statically_bound() const {
if (is_final_method()) return true;
+ bool Method::can_be_statically_bound(AccessFlags class_access_flags) const {
+ if (is_final_method(class_access_flags)) return true;
+ #ifdef ASSERT
+ bool is_nonv = (vtable_index() == nonvirtual_vtable_index);
+ if (class_access_flags.is_interface()) assert(is_nonv == is_static(), err_msg("is_nonv=%s", is_nonv));
+ #endif
+ assert(valid_vtable_index() || valid_itable_index(), "method must be linked before we ask this question");
return vtable_index() == nonvirtual_vtable_index;
}
+ bool Method::can_be_statically_bound() const {
+ return can_be_statically_bound(method_holder()->access_flags());
+ }
bool Method::is_accessor() const {
if (code_size() != 5) return false;
if (size_of_parameters() != 1) return false;
if (java_code_at(0) != Bytecodes::_aload_0 ) return false;
*** 948,958 ****
--- 954,964 ----
return true;
}
assert(ik->is_subclass_of(method_holder()), "should be subklass");
assert(ik->vtable() != NULL, "vtable should exist");
! if (vtable_index() == nonvirtual_vtable_index) {
! if (!has_vtable_index()) {
return false;
} else {
Method* vt_m = ik->method_at_vtable(vtable_index());
return vt_m != this;
}
*** 1941,1958 ****
--- 1947,1965 ----
#endif //PRODUCT
void Method::print_value_on(outputStream* st) const {
assert(is_method(), "must be method");
- st->print_cr(internal_name());
print_address_on(st);
st->print(" ");
name()->print_value_on(st);
st->print(" ");
signature()->print_value_on(st);
st->print(" in ");
method_holder()->print_value_on(st);
+ if (WizardMode) st->print("#%d", _vtable_index);
if (WizardMode) st->print("[%d,%d]", size_of_parameters(), max_locals());
if (WizardMode && code() != NULL) st->print(" ((nmethod*)%p)", code());
}
#if INCLUDE_SERVICES
src/share/vm/oops/method.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File