aboutsummaryrefslogtreecommitdiff
path: root/tests/run/inlinedAssign.scala
Commit message (Collapse)AuthorAgeFilesLines
* Address @smarter's review commentsMartin Odersky2016-10-021-2/+1
|
* Inline function parametersMartin Odersky2016-10-021-1/+5
| | | | | | Add inline function parameters. The previous concept of inlineable closure is adapted to coincide with an inline function parameter.
* Don't drop inline closure bindings that are referred in the bodyMartin Odersky2016-10-021-0/+4
| | | | | The body might still refer to an inline closure argument without fully applying it. In that case the binding may not be dropped.
* Always use implicit context at the current periodMartin Odersky2016-10-021-5/+4
| | | | | | | | | | | | | | | An implicit method might be unpickled in one run and the implicit body might be selected first in a subsequent run. In that case the inlined code was read with the original context, but that context needs to run at the current period. This resulted in denotation out of date errors in bringForward. Another problem with this design was space leaks: An context might survive multiple runs as part of an ImplicitInfo of an unpickled method. The new design avoids both problems. Implicit contexts are always up to date and leaks are avoided.
* Make inline a keywordMartin Odersky2016-10-021-3/+3
| | | | | | | `inline` is now a modifier keyword. To keep disruption tolerable, we still allow `@inline` as an annotation as well. Other uses of `inline` are supported only under `-language:Scala2` and are rewritten to identifiers in backticks.
* Make inline annotation @scala.inline.Martin Odersky2016-10-021-3/+3
| | | | | | | | | | | | | | | | | | Drop @dotty.annotation.inline. This will inline all @inline marked methods in Scala for which a body is known (i.e. that are either compiled in the same run or have Tasty trees available). Option -Yno-inline suppresses inlining. This is needed for the moment because some @inline methods access private members or members that are otherwise inaccessible at the call-site. Also fixes some problems in Inliner - make sure type arguments to inline calls re fully defined - don't forget recursive calls in typeMap - don't forget positions in treeMap - drop dead code dealing with outer.
* Test case for closure inliningMartin Odersky2016-10-021-0/+18
This test works, but closures are not currently inlined. That's a still to do.