| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
After inlining we got a Ycheck error of the form:
found : `this.asInstanceOf[SelfType].C`
expected: `this.C`
The fact that it was related inlining was coincidental I think.
We fix the problem by expanding to
this.asInstanceOf[SelfType & this.type].C
instead.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Because of different close seqences before and after pickling
we could get spurious differences, where in one file things were
put on one line, and in the pther there was a linebreak.
|
|
|
|
|
|
|
| |
1. Imlement typedUnapply
2. Disable implicit view searches and searches
for equality checks - these should have already
happened in the first typer run.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Pickler drops Inlined nodes, so homogenize needs to do the same.
|
| |
|
|
|
|
|
| |
Safety measure: Inline only during typer, not when code
is generated in later phases.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
| |
Dottydoc needs the unexpanded trees so that it can have access to the
attached docstring
|
|
|
|
|
|
|
|
|
| |
Avoid bindings such as
type T = T'
val x: x'.type = x'
Required some refactorings in Inliner.
|
|
|
|
| |
Inline conditionals with constant conditions
|
|
|
|
|
| |
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
|
|
|
|
|
| |
- DRY
- Refactor out special path operations
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
| |
Thicket has a vararg constructor, so this syntax is redundant.
|
|
|
|
|
|
| |
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.
|