| 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
When recursing in a template body, need to update the
context's owner, so that `ref` can work correctly.
|
|
|
|
|
| |
I scanned the main sources with IntellIJ's spell checker and
corrected what showed up.
|
|
|
|
|
| |
Most tests were still commented out in last merge. Also,
an outdated comment in TreeTypeMap was removed.
|
|
|
|
|
|
|
| |
This aligns with the "-" instead of CamelCase convention for
the other command line options.
Also, enable -Yno-double-bindings for dotc_core.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Lazy fields are
- the rhs field of a ValDef or DefDef
- the body field of a Template
These can be instantiated with Lazy instances.
The scheme is such that lazy fields are completely
transparent for users of the Trees API.
The only downside is that the parameter used to initialize
a potentially lazy field has a weak type (now it's Any, with
Dotty it would be a union type of the form `T | Lazy[T]`.
Therefore, the parameter cannot be recovered through pattern
matching.
|
|
|
|
|
|
|
|
|
|
| |
1) Rename `decls` to `unforcedDecls` to make it clear that
it is danegrous to use.
2) Prefer `info.decls` over `unforcedDecls`.
This fixes the problem reported in #305 where the primary
constructor was not found.
|
|
|
|
| |
Typed MemberDef trees now take the modifiers from their symbol's data.
|
|
|
|
|
|
|
| |
Now handles the case where a class symbol itself is not changed by the map,
but one of its declarations is. In this case we need to back out, and create
new symbols for the class and all other symbols that are defined in the same scope as
the class.
|
|
|
|
|
|
|
|
| |
... and these mappings have to be part of the applied substitutions.
Without the patch, the postCondition of FirstTransform fails for TreeInfo.scala and others,
because it selects symbols which are not defined in the mapped class.
Unrelated bugfix: JavaArray derives from Object.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
1. They now keep track of changed constructors in templates, updating
the class scope as for other members.
2. Any changed members are now entered into the new class scope at exactly
the same position as the old one. That ensures that things like caseAccessors
still work.
3. ChangeOwners now is reflected in the prefixes of any named types.
4. Newly created classes now get their own ClassInfo type.
5. TreeTypeMaps always crete "fresh" symbols. Fresh symbols do not share
a NamedType reference with an existing reference to some other symbol.
This obviates b2e0e7b4, which will be reverted.
To make it work, the interface of TreeMap changed from an ownerMap function
to a substitution-like data structure working with two lists.
|
|
|
|
|
|
| |
If definitions in a class are substituted by TreeTypeMap, the new
symbols have to show up in the `decls` scope of the class instead of the
old ones.
|
|
|
|
|
|
| |
In TreeChecker, make sure that every identifier has a type with an elidable prefix.
This excludes identifiers pointing to members of random prefixes without making the
prefix explicit in the tree as part of a Select node.
|
|
Goes into a separate source files. Several simplifying refactorings.
|