Uploaded image for project: 'Scala Programming Language'
  1. Scala Programming Language
  2. SI-6723

2.10 regression: inliner warnings with Map literal and -optimize

    Details

    • Type: Bug
    • Status: CLOSED
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Scala 2.10.0-RC2
    • Fix Version/s: Scala 2.12.0-M4
    • Component/s: Compiler Backend
    • Labels:
      None

      Description

      here's the code:

      % cat S.scala                                  
      object O { Map(
        "a" -> 0, "b" -> 1, "c" -> 2, "d" -> 3, "e" -> 4,
        "a" -> 0, "b" -> 1, "c" -> 2, "d" -> 3, "e" -> 4,
        "a" -> 0, "b" -> 1, "c" -> 2, "d" -> 3, "e" -> 4,
        "f" -> 5, "g" -> 6, "h" -> 7, "i" -> 8) }
      

      2.9 with -optimize likes it fine:

      % scalac29 -version
      Scala compiler version 2.9.2 -- Copyright 2002-2011, LAMP/EPFL
      % scalac29 -optimize S.scala
      

      but with 2.10 (RC2) the inliner starts whining:

      % scalac210 -version
      Scala compiler version 2.10.0-RC2 -- Copyright 2002-2012, LAMP/EPFL
      % scalac210 -optimize S.scala
      warning: there were 3 inliner warnings; re-run with -Yinline-warnings for details
      one warning found
      % scalac210 -optimize -Yinline-warnings S.scala
      warning: At the end of the day, could not inline @inline-marked method ->$extension
      warning: At the end of the day, could not inline @inline-marked method ->$extension
      S.scala:3: warning: At the end of the day, could not inline @inline-marked method any2ArrowAssoc
        "f" -> 5, "g" -> 6, "h" -> 7, "i" -> 8) }                                ^
      three warnings found
      

      The map has to be a certain length before the warnings start appearing.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                rytz Lukas Rytz
                Reporter:
                sethtisue Seth Tisue
              • Votes:
                6 Vote for this issue
                Watchers:
                16 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: