| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Fix #1820: make sure outer of traits implemented
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, we don't generate `outer` for the anonymous class `new Inner2 {}`.
This is incorrect, as `Inner2 {}` extends `A.Inner`, which requires an outer.
trait A {
val a = "a"
trait Inner {
def f = println(a)
def h = 3
}
}
trait B extends A {
trait Inner2 extends Inner
new Inner2 {}
}
|
| | |
|
| |
| |
| |
| | |
Also, integrate Jason's test case with the conditional.
|
| |
| |
| |
| |
| | |
Optimizes implicit closures by avoiding closure
creation where possible.
|
| | |
|
| |
| |
| |
| |
| | |
Run a typical dotty compiler scenario with implicit
contexts.
|
|/
|
|
|
| |
When the expected type is an implicit function, create an
implicit closure to match it.
|
| |
|
| |
|
| |
|
| |
|
|\
| |
| | |
Fix #1543: Ignore IgnoredProto when normalizing method application.
|
| | |
|
| | |
|
|/ |
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
We got unbound symbols before because
a TreeTypeMap would copy a tree of an inline
DefDef but would not adapt the inline body
stored in the @inline annotation of the DefDef
to point to the updated tree.
|
|
|
|
|
|
| |
Add inline function parameters. The previous concept
of inlineable closure is adapted to coincide with
an inline function parameter.
|
|
|
|
|
|
|
|
| |
Pure expressions with function types now are considered
conforming. Necessitated a change in TreeInfo to accept
closures as pure expressions.
Test case in inlineForeach
|
|
|
|
|
| |
The body might still refer to an inline closure argument without
fully applying it. In that case the binding may not be dropped.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Accessors were multiply generated under separate compilation.
To fix this, the resident body of an inlined function is now
the same as the inlined body. Both use accessors where necessary.
Previously, only the inlined body used accessors.
|
|
|
|
|
|
|
| |
`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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This test works, but closures are not currently inlined.
That's a still to do.
|
| |
|
| |
|
|
|
|
| |
Also, do some refactorings and fix some bugs in Inliner.
|
|
|
|
| |
Same test with separate compilation is in inlinePower
|
| |
|
|
|
|
|
| |
Inline trees can now be read form TASTY. However, positions are not set
correctly. This remains to be implemented.
|
|
|
|
|
| |
pos/power inlines with alomst no extraneous boilerplate.
neg/power gives an error that maximal numbers of inlines was exceeded.
|
|
|
|
|
|
|
|
|
| |
... to tag inlined calls. Perform typings and transformations
of inlined calls in a context that refers to the INlined node
in its InlinedCall property.
The idea is that we can use this to issue better error
positions. This remains to be implemented.
|
|
|
|
|
| |
To be done: outer accessors
To be done: error positions
|
|
|
|
|
|
| |
`apply` nodes should not be inserted in the result parts
of a block, if-then-else, match, or try. Instead they should
be added to the surrounding statement.
|
|\
| |
| | |
Fixes for scala.Dynamic
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|