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

No CHA for interface calls when inlining through method handle linker

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P3 P3
    • tbd
    • 19
    • hotspot

      CHA can devirtualize interface calls by strength reducing them to virtual calls when there's only a single direct implementor class present at runtime.

      It relies on symbolic information present in bytecode and doesn't work when invocation goes through method handle linker (MethodHandle.linkToInterface()):

      src/hotspot/share/opto/doCall.cpp:

          if (call_does_dispatch && bytecode == Bytecodes::_invokeinterface) {
            ciInstanceKlass* declared_interface =
                caller->get_declared_method_holder_at_bci(bci)->as_instance_klass();
            ciInstanceKlass* singleton = declared_interface->unique_implementor();

      (Both C1 and C2 are affected.)

            Unassigned Unassigned
            vlivanov Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: