Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7902660

jdis includes unnecessary Field references in MethodHandle parameters while printing static params of a bsm and skips the method tag in ldc# instructions

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: asm_tools_7.0
    • Component/s: tools
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b08

      Description

      jdis includes unnecessary FIeld's reference in MethodHandle parameter while printing static parameters of a bsm and skips the method tag in ldc* instructions:
      ldc Dynamic REF_invokeStatic:CondyIndy.condy_bsm:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Object;)Ljava/lang/Object;":invoke:"Ljava/lang/Object;" {
      int 0
      };
      invokedynamic InvokeDynamic REF_invokeStatic:Method java/lang/runtime/ObjectMethods.bootstrap:"(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/TypeDescriptor;Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/invoke/MethodHandle;)Ljava/lang/Object;":toString:"(Ljavasoft/sqe/tests/api/java/lang/invoke/MethodHandles/Lookup/utils/TestRecord01p01;)Ljava/lang/String;" {
      class TestRecord01p01,
      String "x;y",
      MethodHandle REF_getField:Field TestRecord01p01.x:"I",
      MethodHandle REF_getField:Field TestRecord01p01.y:"I"
      };

      There should be:
      1> ldc Dynamic REF_invokeStatic:Method CondyIndy.condy_bsm:

      invokedynamic InvokeDynamic REF_invokeStatic:Method ... {
      2> MethodHandle REF_getField:TestRecord01p01.x:"I",
      3> MethodHandle REF_getField:TestRecord01p01.y:"I"
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                lkuskov Leonid Kuskov
                Reporter:
                lkuskov Leonid Kuskov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: