| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Thanks @smarter!
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Better comments and refactorings that move some things around
so that less modules depend on Inliner.
|
|
|
|
| |
Now that we have BodyAnnot, InlineInfo can be eliminated.
|
|
|
|
|
|
| |
Since fundamental operations such as treeCopy have to know
about inline bodies, it seems better to represent this
information directly in an annotation.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
When typing an untpd.TypedSplice it could be that the owner
at the time the tree is originally typed is different from the owner
at the time the tree is unwrapped. In that case the owner needs
to be changed.
Problem was noticed in Course-2002-02 after changing Closure to
be a pure expression. This means that TypedSplices containing
closures are no longer lifted out from containing closures
during eta expansion, and the owner chain got corrupted.
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
- allow inline as an alternative to final for vals
(final is retained for backwards compatibility for now)
- allow inline for parameters
- check that rhs of inline value has a constant type
- check that arguments to inline value parameters have constant type
- check that inline members are not deferred
- make inline members effectively final
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Make sure that inline accessors are not added twice. We got lucky so far
because the fact that annotations are lazy meant that attachments did not
persist. But if @inline was made into a strict annotation, inline accessors were indeed
added twice.
|
|
|
|
|
|
| |
Now it's done on the symbol directly rather than its inline
annotation. This simplifies client code and keeps the implementaion how
inline infos should be assocated with inline methods open.
|
| |
|
|
|
|
|
|
| |
If an argumnet to an inline method refers to a closure
that is the result of eta-expanding another inline method
inline the argument method.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
This makes existsing uses of inline mostly compile.
Todo: Verify that stdlib can be compiled.
Todo: Implement accessors for assignments to priavte variables
Todo: Figure out what to do with accesses to private types.
|
|
|
|
|
|
| |
The previous check whether a method was an inlined method with a body
forced computation of the body, which led to problems when dealing with
recursive inline methods.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
1. Imlement typedUnapply
2. Disable implicit view searches and searches
for equality checks - these should have already
happened in the first typer run.
|
|
|
|
|
|
|
|
| |
1. Don't generate local aliases - we can potentially run into
avoidance problems later for such aliases
2. Scan all parts of leaf types for things that need to be
registered cor remappings.
|
|
|
|
|
|
|
|
| |
1. Better formatting in TreeChecker error message
2. Re-enable printing what stack of what was checked
when an error occurred. This was disabled in Retyper
because we did not do it for the Inliner typer.
Now we distinguish on phase instead.
|
|
|
|
|
| |
- Remap typerefs
- Register types in TypeTrees
|
|
|
|
|
| |
To do this, use a proper TypeAssigner for Inlined, analogous to
how we type Blocks.
|
|
|
|
| |
Keeping as a static object causes suspected dataraces.
|
|
|
|
| |
Also, do some refactorings and fix some bugs in Inliner.
|