aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #1634 from dotty-staging/change-tasty-pos-ctdodersky2016-11-215-58/+49
|\ | | | | Towards correct positions in TASTY types
| * Make This and Super take idents as qualifier/mixinMartin Odersky2016-11-214-12/+19
| | | | | | | | | | 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-161-3/+7
| | | | | | | | | | | | | | 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-114-46/+26
| | | | | | | | | | | | | | | | 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.
* | Merge pull request #1717 from dotty-staging/fix-#1688odersky2016-11-161-8/+24
|\ \ | | | | | | Don't allow redefinition of core classes
| * | Don't allow redefinition of core classesMartin Odersky2016-11-101-8/+24
| |/ | | | | | | Fixes #1688.
* / Fix #1662: Add missing case for singletonMartin Odersky2016-11-101-2/+3
|/ | | | | | Have to handle also SkolemTypes there. Fixes #1662.
* Use inline flag instead of @inline annotationMartin Odersky2016-11-071-2/+1
| | | | | Convert `@inline` annotations to `inline` flags, not the other way round as was done before.
* Fix #1643: Avoid crash due to previous errorsMartin Odersky2016-11-051-1/+1
| | | | | We assumed that argument types in an untpd.New are never wildcards but in the face of errors that is not true.
* Merge pull request #1655 from dotty-staging/change-future-defs-okodersky2016-11-051-7/+6
|\ | | | | Fix #1637: Future defs are always OK
| * Fix #1637: Future defs are always OKMartin Odersky2016-10-311-7/+6
| | | | | | | | | | | | | | 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-38/+88
|\ \ | |/ |/| Fix Tasty positions
| * Make cloned trees have new uniqueIdsMartin Odersky2016-10-311-5/+15
| | | | | | | | | | They used to share the same id as the tree they were cloned from, which makes id's not really unique.
| * Don't convert to literals before picklingMartin Odersky2016-10-311-11/+58
| | | | | | | | | | | | | | | | | | 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.
| * Maintain point for positions of definitionsMartin Odersky2016-10-201-1/+1
| | | | | | | | | | This is needed to figure out where the defined name is in a definition.
| * Mention Inlined transformation in docsMartin Odersky2016-10-181-1/+3
| |
| * Drop original on TypeTreeMartin Odersky2016-10-153-18/+9
| | | | | | | | | | | | | | | | 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/+2
| | | | | | | | | | | | | | 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.
* | Update IllegalVariableInPatternAlternative error messageShane Delmore2016-10-251-1/+1
| |
* | address review feedbackliu fengyun2016-10-221-14/+14
| |
* | Record syntactic information about modifiersliu fengyun2016-10-221-4/+46
| |
* | Improved error messages in Desugar.scalaShane Delmore2016-10-191-4/+4
|/
* 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-122-10/+10
| |
* | Get rid of unnecessary fields in `MessageContainer`Felix Mulder2016-10-101-2/+0
| |
* | Improve positions for MemberDefs using `namePos`Felix Mulder2016-10-101-2/+5
| |
* | Improve documentation for message frameworkFelix Mulder2016-10-101-2/+2
|/
* Add `Comments` object instead of `Scanners.Comment` case classFelix Mulder2016-10-061-2/+1
|
* Fix build failure after merging #1492Guillaume Martres2016-10-061-1/+3
| | | | The one-parameter constructor of SourceFile was removed in #1494
* Address @smarter's review commentsMartin Odersky2016-10-022-2/+2
|
* Remove incorrect special case for Inline purity checksGuillaume Martres2016-10-021-2/+1
| | | | | | | | | 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.
* CleanupsMartin Odersky2016-10-022-3/+20
| | | | | Better comments and refactorings that move some things around so that less modules depend on Inliner.
* Move logic from InlineInfo to BodyAnnotMartin Odersky2016-10-021-4/+3
| | | | Now that we have BodyAnnot, InlineInfo can be eliminated.
* Use BodyAnnot to indicate rhs of inline methodMartin Odersky2016-10-021-4/+1
| | | | | | Since fundamental operations such as treeCopy have to know about inline bodies, it seems better to represent this information directly in an annotation.
* Handle inlining in inlining argumentsMartin Odersky2016-10-022-2/+11
| | | | | | | | 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.
* Generalize checkInlineConformant to functionsMartin Odersky2016-10-021-1/+4
| | | | | | | | Pure expressions with function types now are considered conforming. Necessitated a change in TreeInfo to accept closures as pure expressions. Test case in inlineForeach
* Change owner as necessary when typing a TypedSpliceMartin Odersky2016-10-021-3/+8
| | | | | | | | | | | | 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.
* Don't drop inline closure bindings that are referred in the bodyMartin Odersky2016-10-021-6/+16
| | | | | The body might still refer to an inline closure argument without fully applying it. In that case the binding may not be dropped.
* Inline argument closures to inline methodsMartin Odersky2016-10-021-2/+8
| | | | | | 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.
* Better names and documentation for Inliner.Martin Odersky2016-10-021-1/+14
|
* Add accessors for non-public members accessed from inline methodsMartin Odersky2016-10-021-0/+14
| | | | | | | | 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.
* Avoid reference to local bindings in Inlined nodesMartin Odersky2016-10-021-1/+1
| | | | | To do this, use a proper TypeAssigner for Inlined, analogous to how we type Blocks.
* Fix some problems in InlinerMartin Odersky2016-10-021-0/+4
| | | | | | | | | | | | | | 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.
* Add Inlined tree nodeMartin Odersky2016-10-023-0/+19
| | | | | | | | | ... 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-023-10/+10
| | | | To do this, factor out Key from Attachment into a new type, Property.Key.
* Make namePos a member of memberDefMartin Odersky2016-09-291-0/+14
| | | | | That way it can be accessed by other parts which deal with error messages.
* Make Modifiers untyped only.Martin Odersky2016-09-282-60/+54
| | | | | The typed variant is no longer needed. This means modifiers can safely be ignored in typed trees if we so choose.
* Eliminate tpd.Modifiers.Martin Odersky2016-09-261-5/+0
| | | | | | 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.
* Drop tpd.modsDecoMartin Odersky2016-09-264-37/+18
| | | | Prefer to access directly via symbol.