| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
We got an error when we tried t opur @inline annotations
on function parameter types. It turned out that there were
lots of places where annotations on a type would break a test
in the compiler.
So we now drop annotations by default when dealiasing. We provide
dealiasKeepAnnots as an alternative that has the old behavior, i.e.
rewrap annotations after dealiasing. The only place where we found we
needed this was in the exhaustivity checker.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
`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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Inlined operations are: Stats.track and all variants
of Reporter.traceIndented.
|
|
|
|
| |
Print what was pickled when failing with unresoilvced symbols.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Also, do some refactorings and fix some bugs in Inliner.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. Don't retypecheck the arguments of an inlined epressions.
These might be very large (e.g. inlined track, or traceIndented in dotty)/
2. Keep track of inlined calls in context instead of
Inlined nodes. We only need the to compute the source file, the rest
is irrelevant.
3. In Def bindings of inlined by-name parameters, change owner of right
hand side. Otherwise we get incorrect owner chains.
4. In TreeTypeMap, treat Inlined in the same way as a block.
|
|
|
|
|
|
|
|
|
|
|
| |
This required a major change in the way positions are handled, as the
previous scheme did not allow to read the positions of arbitrary subtrees
selectively.
Fortunately, it's altogether a major simplification.
Also, this fixed a bug in the previous scheme, where positions were
generated before compactification, resulting in addresses being wrong.
|
|
|
|
|
| |
Inline trees can now be read form TASTY. However, positions are not set
correctly. This remains to be implemented.
|
|
|
|
|
| |
- represent directly as a list
- can replace separate inlineCount
|
|
|
|
|
| |
Error messages now print the inlined positions as well
as the position of the inlined call, recursively.
|
| |
|
|
|
|
|
|
|
|
|
| |
... 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 do this, factor out Key from Attachment into a new type, Property.Key.
|
|
|
|
|
| |
To be done: outer accessors
To be done: error positions
|
|
|
|
|
| |
That way it can be accessed by other parts which deal with
error messages.
|
|
|
|
|
| |
The typed variant is no longer needed. This means modifiers can safely be
ignored in typed trees if we so choose.
|
|
|
|
|
|
| |
Roll its functionality into Select. Since we can always
tell whether a tree is a type or term there is no expressiveness
gained by having a separate tree node.
|
|
|
|
|
|
|
|
| |
Drop tree node class 'Pair'. It was used only in imports, where
it can easily be replaced by Thicket.
The envisaged use for generic pairs is almost sure better modelled
by a "Pair" class in Dotty's standard library.
|
|
|
|
|
|
|
|
|
| |
Now it's annotated first, annotation second.
This is in line with AnnotatedType and in line with the principle
that tree arguments should come in the order they are written. The
reason why the order was swapped before is historical - Scala2 did it
that way.
|
|\
| |
| | |
Clean up config.Printers imports
|
| |
| |
| |
| | |
And remove the not used Printer#echo
|
| |
| |
| |
| |
| |
| |
| |
| | |
Wehn compiling dotty repeatedly using dotc.Bench, we got a stale symbol
error involving an outer field of a Scala class. These can always be assumed
to be current, as we would not think to recompile Scala2 classes mixed
with dotty classes in the same session (we'd need two concurrent
compilers for that).
|