RFR (L) : 8014013 : CallInfo structure no longer accurately reports the result of a LinkResolver operation

David Chase david.r.chase at oracle.com
Thu Sep 5 10:00:51 PDT 2013


Latest webrev: http://cr.openjdk.java.net/~drchase/8014013/webrev.04/

On 2013-08-26, at 1:22 PM, Karen Kinnear <karen.kinnear at oracle.com> wrote:

> couple of questions:
> 1. In init_method_MemberNames
> The comment "interfaces are interconvertible" is no longer true with abstract methods.
> The next sentence I believe is true, so perhaps you could delete the first one

Sentence deleted.

> 2. In method.cpp in is_final_method
> Could you please delete the comment lies 513-514
> "Should return true for private methods also, since there is no way to override them?"
> 
> Yes, you do not override private methods. However, this call is used to determine if you
> need a vtable entry. Private methods always get a vtable entry to handle backward compatibility
> with classes - i.e. you can have the same name of a private method local to your class and also
> inherit a method of from your superclass, which will get inherited around the private method, by
> your child.
> 
> And yes, you can have an overpass method, which does not require a vtable entry,
> so the "can this happen?" answer is yes - so you can remove the question.

Question removed.

bool Method::is_final_method(AccessFlags class_access_flags) const {
  // or "does_not_require_vtable_entry"
  // overpass can occur, is not final (reuses vtable entry)
  // private methods get vtable entries for backward class compatibility.
  if (is_overpass())  return false;
  return is_final() || class_access_flags.is_final();
}

> 4. klassVtable.cpp
> lines 773-774
> I'd like to understand better what this case represents?
> Same question interpreterRuntime.cpp
> CharSequence.toString - use vtable not itable (706-707)

inline bool interface_method_needs_itable_index(Method* m) {
  if (m->is_static())           return false;   // e.g., Stream.empty
  if (m->is_initializer())      return false;   // <init> or <clinit>
  // If an interface redeclares a method from java.lang.Object,
  // it should already have a vtable index, don't touch it.
  // e.g., CharSequence.toString (from initialize_vtable)
  // if (m->has_vtable_index())  return false; // NO!
  return true;
}

> 5. linkResolver.hpp
>  direct_call line 45, and _call_kind line 55: 
>     I think this includes both static and invokeSpecial calls - correct? so the "static" in the comment
>   in 55 might want to be expanded

Fixed:
  CallKind     _call_kind;              // kind of call (static/special, vtable, itable)



More information about the hotspot-runtime-dev mailing list