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

Fix comment in rewriter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 10
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b21

      Description

      // If the constant pool entry for invokespecial is InterfaceMethodref,
      // we need to add a separate cpCache entry for its resolution, because it is
      // different than the resolution for invokeinterface with InterfaceMethodref.
      // These cannot share cpCache entries. It's unclear if all invokespecial to
      // InterfaceMethodrefs would resolve to the same thing so a new cpCache entry
      // is created for each one. This was added with lambda.
      void Rewriter::rewrite_invokespecial(address bcp, int offset, bool reverse, bool* invokespecial_error) {
      ...

      We do in fact share cpCache entries for invokespecial/IMR combinations if the IMR is the same.

        // add a new CP cache entry beyond the normal cache for the special case of
        // invokespecial with InterfaceMethodref as cpool operand.
        int add_invokespecial_cp_cache_entry(int cp_index) {
          assert(_first_iteration_cp_cache_limit >= 0, "add these special cache entries after first iteration");
          // Don't add InterfaceMethodref if it already exists at the end.
          for (int i = _first_iteration_cp_cache_limit; i < _cp_cache_map.length(); i++) {
            if (cp_cache_entry_pool_index(i) == cp_index) {
              return i;
            }
          }

        Attachments

          Activity

            People

            Assignee:
            coleenp Coleen Phillimore
            Reporter:
            coleenp Coleen Phillimore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: