Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8164586

Clean up condition for signature polymorphic holder

    Details

      Description

      There are numerous places in the VM enumerating the set of classes that define signature polymorphic methods:

        static bool has_member_arg(Symbol* klass, Symbol* name) {
          if ((klass == vmSymbols::java_lang_invoke_MethodHandle() ||
               klass == vmSymbols::java_lang_invoke_VarHandle()) &&

      vmIntrinsics::ID MethodHandles::signature_polymorphic_name_id(Klass* klass, Symbol* name) {
        if (klass != NULL &&
            (klass->name() == vmSymbols::java_lang_invoke_MethodHandle() ||
             klass->name() == vmSymbols::java_lang_invoke_VarHandle())) {

      bool MethodHandles::is_method_handle_invoke_name(Klass* klass, Symbol* name) {
        if (klass == NULL)
          return false;
        // The following test will fail spuriously during bootstrap of MethodHandle itself:
        // if (klass != SystemDictionary::MethodHandle_klass())
        // Test the name instead:
        if (klass->name() != vmSymbols::java_lang_invoke_MethodHandle() &&
            klass->name() != vmSymbols::java_lang_invoke_VarHandle()) {

      Each of these locations need to be updated when/if this set changes. It's easy to miss a few (see JDK-8164214, JDK-8163962). This repetition should be cut down to as few places as possible, ideally all located in methodHandles.[ch]pp.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                dnsimon Douglas Simon
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated: