提交 b4bc21c1 编写于 作者: B bharadwaj

8001077: remove ciMethod::will_link

Summary: Removed will_link and changed all calls to is_loaded().
Reviewed-by: kvn
上级 00de2884
...@@ -1836,7 +1836,7 @@ void GraphBuilder::invoke(Bytecodes::Code code) { ...@@ -1836,7 +1836,7 @@ void GraphBuilder::invoke(Bytecodes::Code code) {
// check if we could do inlining // check if we could do inlining
if (!PatchALot && Inline && klass->is_loaded() && if (!PatchALot && Inline && klass->is_loaded() &&
(klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized()) (klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized())
&& target->will_link(klass, callee_holder, code)) { && target->is_loaded()) {
// callee is known => check if we have static binding // callee is known => check if we have static binding
assert(target->is_loaded(), "callee must be known"); assert(target->is_loaded(), "callee must be known");
if (code == Bytecodes::_invokestatic || if (code == Bytecodes::_invokestatic ||
......
...@@ -282,7 +282,7 @@ void BCEscapeAnalyzer::invoke(StateInfo &state, Bytecodes::Code code, ciMethod* ...@@ -282,7 +282,7 @@ void BCEscapeAnalyzer::invoke(StateInfo &state, Bytecodes::Code code, ciMethod*
ciMethod* inline_target = NULL; ciMethod* inline_target = NULL;
if (target->is_loaded() && klass->is_loaded() if (target->is_loaded() && klass->is_loaded()
&& (klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized()) && (klass->is_initialized() || klass->is_interface() && target->holder()->is_initialized())
&& target->will_link(klass, callee_holder, code)) { && target->is_loaded()) {
if (code == Bytecodes::_invokestatic if (code == Bytecodes::_invokestatic
|| code == Bytecodes::_invokespecial || code == Bytecodes::_invokespecial
|| code == Bytecodes::_invokevirtual && target->is_final_method()) { || code == Bytecodes::_invokevirtual && target->is_final_method()) {
......
...@@ -875,25 +875,6 @@ ciMethodData* ciMethod::method_data_or_null() { ...@@ -875,25 +875,6 @@ ciMethodData* ciMethod::method_data_or_null() {
return md; return md;
} }
// ------------------------------------------------------------------
// ciMethod::will_link
//
// Will this method link in a specific calling context?
bool ciMethod::will_link(ciKlass* accessing_klass,
ciKlass* declared_method_holder,
Bytecodes::Code bc) {
if (!is_loaded()) {
// Method lookup failed.
return false;
}
// The link checks have been front-loaded into the get_method
// call. This method (ciMethod::will_link()) will be removed
// in the future.
return true;
}
// ------------------------------------------------------------------ // ------------------------------------------------------------------
// ciMethod::should_exclude // ciMethod::should_exclude
// //
......
...@@ -241,9 +241,6 @@ class ciMethod : public ciMetadata { ...@@ -241,9 +241,6 @@ class ciMethod : public ciMetadata {
int resolve_vtable_index(ciKlass* caller, ciKlass* receiver); int resolve_vtable_index(ciKlass* caller, ciKlass* receiver);
// Compilation directives // Compilation directives
bool will_link(ciKlass* accessing_klass,
ciKlass* declared_method_holder,
Bytecodes::Code bc);
bool should_exclude(); bool should_exclude();
bool should_inline(); bool should_inline();
bool should_not_inline(); bool should_not_inline();
......
...@@ -334,7 +334,7 @@ bool Parse::can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass* kl ...@@ -334,7 +334,7 @@ bool Parse::can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass* kl
return true; return true;
} }
assert(dest_method->will_link(method()->holder(), klass, bc()), "dest_method: typeflow responsibility"); assert(dest_method->is_loaded(), "dest_method: typeflow responsibility");
return false; return false;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册