aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1725 from dotty-staging/change-pickle-earlyGuillaume Martres2016-11-221-6/+14
|\ | | | | Don't retain picklers until backend.
| * Don't keep full picklers around until backend.Martin Odersky2016-11-181-6/+14
| | | | | | | | | | | | The memory footprint captured by pickler seems to be about 1/3rd of total footprint. So we gain a lot by not making this die sooner rather than later.
* | Merge pull request #1634 from dotty-staging/change-tasty-pos-ctdodersky2016-11-215-9/+9
|\ \ | |/ |/| Towards correct positions in TASTY types
| * Make This and Super take idents as qualifier/mixinMartin Odersky2016-11-212-5/+5
| | | | | | | | | | 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.
| * Pickle and unpickle type treesMartin Odersky2016-11-162-3/+3
| | | | | | | | | | | | | | 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.
| * Clean up parameterized typedefsMartin Odersky2016-11-111-1/+1
| | | | | | | | | | | | | | | | 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.
* | Fix #1664: Refine isOuterRef conditionMartin Odersky2016-11-101-8/+12
|/ | | | | | | | We forgot the case where a hoistable method can still refer to free variables that have to be passed using outer pointers. Fixes #1664.
* Change `ClassicReporter` to `TestReporter` in test sourcesFelix Mulder2016-11-091-8/+4
|
* Merge pull request #1655 from dotty-staging/change-future-defs-okodersky2016-11-052-7/+3
|\ | | | | Fix #1637: Future defs are always OK
| * Fix #1637: Future defs are always OKMartin Odersky2016-10-312-7/+3
| | | | | | | | | | | | | | 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.
* | Merge pull request #1587 from dotty-staging/change-tasty-posGuillaume Martres2016-11-045-77/+85
|\ \ | |/ |/| Fix Tasty positions
| * Keep rhs of TypeDefs until picklingMartin Odersky2016-10-311-18/+15
| | | | | | | | | | Don't convert to a TypeTree in PostTyper, because that loses internal positions.
| * Roll normalizedTree into main PostTyper transformMartin Odersky2016-10-311-29/+14
| | | | | | | | | | Since we now transform all type trees, no need to have a separate traversal for checking.
| * Don't convert to literals before picklingMartin Odersky2016-10-312-39/+28
| | | | | | | | | | | | | | | | | | 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.
| * Don't convert to TypeTrees before picklingMartin Odersky2016-10-312-18/+39
| | | | | | | | | | | | If we want to pickle types with positions we should not converyt to TypeTrees before pickling. Instead, type trees are now converted to TypeTrees in FirstTransform.
| * Mention Inlined transformation in docsMartin Odersky2016-10-181-0/+3
| |
| * Minimize inline call info in PostTyperMartin Odersky2016-10-171-0/+13
| |
| * Handle shared treesMartin Odersky2016-10-161-2/+2
| | | | | | | | | | | | | | Shared trees are pickled under multiple addresses. Previously, only the last address was stored, which led to trees with unknown positions. Now, all addresses are stored.
| * Drop original on TypeTreeMartin Odersky2016-10-152-5/+2
| | | | | | | | | | | | | | | | 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
| * Preserve all positions in Tasty.Martin Odersky2016-10-151-2/+5
| | | | | | | | | | | | | | 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.
* | Fix #1614: correctly handle polymorphic inner methodsDmitry Petrashko2016-10-231-1/+5
| | | | | | | | | | Even if outer class & method isn't polymorpnic, inner method might be. Need to handle this correctly.
* | Fix #1286: Error on inexistent imports that are not used.Nicolas Stucki2016-10-211-0/+13
| | | | | | | | This commit also fixes #1583.
* | Merge pull request #1595 from dotty-staging/fix-#1567odersky2016-10-201-5/+15
|\ \ | | | | | | Fix #1567: Widen private constructor in value class
| * | Fix #1567: Widen private constructor in value classMartin Odersky2016-10-141-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | Private or protected constructors of value classes need to be widenened to public in order to enable boxing anywhere. Technically we should also do something about qualified private constructors, but since we want to get rid of them anyway it's urgent.
* | | add another test for i1540liu fengyun2016-10-141-1/+1
| | |
* | | fix #1540: overloaded get and isDefined in option-less patmatliu fengyun2016-10-141-9/+13
| |/ |/|
* | Merge pull request #1565 from Blaisorblade/warningsFelix Mulder2016-10-141-2/+2
|\ \ | |/ |/| Small fixes to some warnings/comment typos
| * Fix typosPaolo G. Giarrusso2016-10-071-2/+2
| |
* | Merge GenericType, TypeLambda and PolyTypeMartin Odersky2016-10-123-6/+6
| |
* | Harmonize PolyType and TypeLambdaMartin Odersky2016-10-122-4/+4
| | | | | | | | | | | | Let them inherit the same traits and push as much functionality as possibly into the common superclass GenericType.
* | Refactor Splitter functionalityMartin Odersky2016-10-112-30/+30
| | | | | | | | | | | | | | | | Splitting or types is no longer needed with new scheme. Replacing idents with This nodes is better done in ExplicitSelf. So splitter now just distributes applications into and ifs.
* | Scrutinize selections in TreeCheckerMartin Odersky2016-10-111-4/+23
| | | | | | | | | | | | | | | | Makes sure the symbol in the tree can be approximately reconstructed by calling member on the qualifier type. Approximately means: The two symbols might be different but one still overrides the other.
* | Reformatting to avoid a long lineMartin Odersky2016-10-111-1/+4
| |
* | Fix non-sensical codeMartin Odersky2016-10-111-1/+4
| | | | | | | | | | | | Replacing or types by their dominators and implicit conversions caused the code to do the right thing anyway, but with the arrival of true or-types, this became a static error.
* | Fix TreeChecker mismatch stringFelix Mulder2016-10-101-4/+5
| |
* | Improve positions for MemberDefs using `namePos`Felix Mulder2016-10-101-4/+9
|/
* CleanupsMartin Odersky2016-10-021-2/+1
| | | | | Better comments and refactorings that move some things around so that less modules depend on Inliner.
* Drop annotations from dealiasMartin Odersky2016-10-021-1/+1
| | | | | | | | | | | | 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.
* Fix ExplicitSelf phaseMartin Odersky2016-10-021-2/+3
| | | | | | | | | | | | | | 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.
* Handle Inlined blocks on ElimErasedValueTypeMartin Odersky2016-10-021-0/+3
|
* Better diagnostics for TreeCheckerMartin Odersky2016-10-021-2/+3
| | | | | | | | 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.
* Handle outer this in InlinerMartin Odersky2016-10-024-3/+10
| | | | Also, do some refactorings and fix some bugs in Inliner.
* Set the positions of inlined trees wehn read form TastyMartin Odersky2016-10-021-2/+3
| | | | | | | | | | | 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.
* Track Inlined nodes in ctx.sourceMartin Odersky2016-10-021-0/+15
|
* Add Inlined tree nodeMartin Odersky2016-10-022-1/+34
| | | | | | | | | ... 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.
* Make Context#moreProperties strongly typedMartin Odersky2016-10-021-2/+2
| | | | To do this, factor out Key from Attachment into a new type, Property.Key.
* First version of inline schemeMartin Odersky2016-10-021-0/+4
| | | | | To be done: outer accessors To be done: error positions
* Drop tpd.modsDecoMartin Odersky2016-09-262-4/+3
| | | | Prefer to access directly via symbol.
* Eliminate SelectFromTypeTree from docsMartin Odersky2016-09-251-1/+0
|
* Get rid of Thicket(List(...)) as an expressionMartin Odersky2016-09-251-4/+4
| | | | Thicket has a vararg constructor, so this syntax is redundant.