summaryrefslogtreecommitdiff
path: root/test/files/run/delambdafy_uncurry_byname_method.scala
Commit message (Collapse)AuthorAgeFilesLines
* Disable -Ydelambdafy:method for specialized FunctionNJason Zaugg2015-04-101-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | The Delambdafy phase generates its `FunctionN` subclasses after the specialization phase. As such, `((x: Int) => x).apply(42)` incurs boxing. This commit falls back to the `-Ydelambdafy:inline` in this case. This is done by running the specialization type map over the type of the function, and seeing if anything changes. To make this work robustly, we first need to ensure that the specialization info transformer has processed all the function types. This is not a fundamental limitation; we could in principle generate the specialized code. A followup change will use `-Ydelambdafy:method` as the basis for invokedymnamic lambdas. As part of that stream of work, we will synthesize specialization-aware lambdas, and remove the fallback to `-Ydelambdafy:inline`. I have updated some tests that intend to test the delambdafy transform to avoid use of specialized function types.
* Adds a setting to delay delambdafication. If set then uncurry liftsJames Iry2013-11-061-0/+20
the body of a lambda into a local def. Tests are included to show the different tree shapes.