comparison src/share/vm/ci/ciMethod.cpp @ 12264:b2e698d2276c

8014013: CallInfo structure no longer accurately reports the result of a LinkResolver operation Summary: Enhance method resolution and resulting data structures, plus some refactoring. Reviewed-by: twisti, acorn, jrose
author drchase
date Fri, 13 Sep 2013 22:38:02 -0400
parents 6f3fd5150b67
children cefad50507d8 5cc2d82aa82a
comparison
equal deleted inserted replaced
12261:2c98370f2611 12264:b2e698d2276c
284 // Get the position of this method's entry in the itable, if any. 284 // Get the position of this method's entry in the itable, if any.
285 int ciMethod::itable_index() { 285 int ciMethod::itable_index() {
286 check_is_loaded(); 286 check_is_loaded();
287 assert(holder()->is_linked(), "must be linked"); 287 assert(holder()->is_linked(), "must be linked");
288 VM_ENTRY_MARK; 288 VM_ENTRY_MARK;
289 return klassItable::compute_itable_index(get_Method()); 289 Method* m = get_Method();
290 if (!m->has_itable_index())
291 return Method::nonvirtual_vtable_index;
292 return m->itable_index();
290 } 293 }
291 #endif // SHARK 294 #endif // SHARK
292 295
293 296
294 // ------------------------------------------------------------------ 297 // ------------------------------------------------------------------
1135 } 1138 }
1136 1139
1137 // ------------------------------------------------------------------ 1140 // ------------------------------------------------------------------
1138 // ciMethod::check_call 1141 // ciMethod::check_call
1139 bool ciMethod::check_call(int refinfo_index, bool is_static) const { 1142 bool ciMethod::check_call(int refinfo_index, bool is_static) const {
1143 // This method is used only in C2 from InlineTree::ok_to_inline,
1144 // and is only used under -Xcomp or -XX:CompileTheWorld.
1145 // It appears to fail when applied to an invokeinterface call site.
1146 // FIXME: Remove this method and resolve_method_statically; refactor to use the other LinkResolver entry points.
1140 VM_ENTRY_MARK; 1147 VM_ENTRY_MARK;
1141 { 1148 {
1142 EXCEPTION_MARK; 1149 EXCEPTION_MARK;
1143 HandleMark hm(THREAD); 1150 HandleMark hm(THREAD);
1144 constantPoolHandle pool (THREAD, get_Method()->constants()); 1151 constantPoolHandle pool (THREAD, get_Method()->constants());