Convert MethodTypeDescImpl parameter storage from array to immutable list

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Won't Fix
    • Priority: P4
    • None
    • Affects Version/s: 12
    • Component/s: 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.

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

              Created:
              Updated:
              Resolved: