| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
Towards correct positions in TASTY types
|
| |
| |
| |
| |
| | |
The qualifier of a This and the mixin of a Super were names, which meant
that their positions were lost. Now they are untyped idents.
|
| |
| |
| |
| |
| |
| |
| | |
Lots of other changes to make positions work out everywhere.
One important change is that now trees can be shared, just
as types can. This change improves memory requirements (a bit)
and also makes positions in shared trees more robust.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Express them in terms PolyTypeTrees rather than having an
irregular, untyped only tparams field. This is necessary
if we want to pickle type trees instead of types, because
now the rhs of a typedef tells the whole story, so we are not
required any longer to use the info of the symbol.
|
|\ \
| | |
| | | |
Don't allow redefinition of core classes
|
| |/
| |
| |
| | |
Fixes #1688.
|
|/
|
|
|
|
| |
Have to handle also SkolemTypes there.
Fixes #1662.
|
|
|
|
|
| |
Convert `@inline` annotations to `inline` flags, not the
other way round as was done before.
|
|
|
|
|
| |
We assumed that argument types in an untpd.New are never wildcards but
in the face of errors that is not true.
|
|\
| |
| | |
Fix #1637: Future defs are always OK
|
| |
| |
| |
| |
| |
| |
| | |
Drop special mode that handles future defs without which we
get DenotationNotDefinedHere errors. In more than a year, this
has only turned up false negatives. So I think it's better to
drop the check, and the contortions needed to deal with it.
|
|\ \
| |/
|/| |
Fix Tasty positions
|
| |
| |
| |
| |
| | |
They used to share the same id as the tree they were cloned from,
which makes id's not really unique.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We need to keep the original expressions around
for accurate linking with the source file. That holds
also if the expression has a constant type, so it should
not be converted to a literal before pickling.
Instead it will be converted in FirstTransform.
|
| |
| |
| |
| |
| | |
This is needed to figure out where the defined name is in a
definition.
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The plan is to keep original type until after pickling,
and afterwards replace it with a simple TypeTree.
# Conflicts:
# src/dotty/tools/dotc/core/tasty/TreePickler.scala
|
| |
| |
| |
| |
| |
| |
| | |
The goal is that pickled and unpickled trees should print
the same with -Yprintpos. There are several reasons why this
is not the case so far. Some of them are fixed in this
commit.
|
| | |
|
| | |
|
| | |
|
|/ |
|
|\
| |
| | |
Small fixes to some warnings/comment typos
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
The one-parameter constructor of SourceFile was removed in #1494
|
| |
|
|
|
|
|
|
|
|
|
| |
This special case was added two years ago, quoting from
5428549a57b710b11e57aab4eee24e9b89b8b97c
"Inlined pure values are pure even if referenced from impure
prefixes (i.e. prefix need not be evaluated)"
This does not match the current semantics for inline where the prefix is
always evaluated.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
Pure expressions with function types now are considered
conforming. Necessitated a change in TreeInfo to accept
closures as pure expressions.
Test case in inlineForeach
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
To do this, use a proper TypeAssigner for Inlined, analogous to
how we type Blocks.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
... 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.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Backend does not need them after all, can just use nulls there.
So the functionality is only used for printing, and it makes
sense to move everything there.
|
|
|
|
| |
Prefer to access directly via symbol.
|