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

Convert MethodTypeDescImpl parameter storage from array to immutable list

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 12
    • core-libs
    • None

      While MethodType uses arrays to store parameter types (which is convenient to interact with the VM), MethodTypeDesc does not have to: arrays are subject to defensive copying, which can become a performance bottleneck in sensitive applications like bytecode generation. By passing immutable lists through parameterList() and MethodTypeDesc.of (see JDK-8306698), we can avoid defensive copying without more complicated syntax like checking parameterCount() for MethodType.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: