Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-10031

Compiler writes multianewarray instruction for all non-initializer array allocations

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.0.0-alpha-3
    • Component/s: bytecode
    • Labels:
      None

      Description

      AsmClassGenerator#visitArrayExpression chooses the multianewarray instruction for all size-based array allocations. The anewarray instruction is available for one-dimensional arrays.

      String[] strings = new String[0]
      //     n  iconst_0
      //   n+1  multianewarray java.lang.String[]
      // vs.
      //     n  iconst_0
      //   n+1  anewarray java.lang.String
      

        Attachments

          Activity

            People

            • Assignee:
              emilles Eric Milles
              Reporter:
              emilles Eric Milles
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h