aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core
Commit message (Collapse)AuthorAgeFilesLines
* Fix reporting of ErrorTypes in highlighted segmentsFelix Mulder2016-10-101-0/+4
|
* Remove duplication of console reportersFelix Mulder2016-10-101-1/+1
|
* Rename `ConsoleReporter` => `FancyConsoleReporter`Felix Mulder2016-10-101-1/+1
|
* Add missing star in docstringFelix Mulder2016-10-101-1/+1
|
* Remove `Context` reference in `Comment` and `UseCase`Felix Mulder2016-10-061-16/+28
|
* Separate `ContextDocstrings` from `Context` and make it pluggableFelix Mulder2016-10-063-48/+37
|
* Implement docbase as propertyFelix Mulder2016-10-063-8/+9
|
* Typecheck usecases in fresh local scopeFelix Mulder2016-10-061-1/+1
|
* Move docstring cooking to dottyFelix Mulder2016-10-062-14/+362
|
* Fix cooking of docstringsFelix Mulder2016-10-063-8/+10
|
* Fix type parameters not getting properly typedFelix Mulder2016-10-061-14/+3
|
* Fix name clashes because of `@usecase`Felix Mulder2016-10-061-12/+25
|
* Add `Comments` object instead of `Scanners.Comment` case classFelix Mulder2016-10-062-1/+78
|
* Address @smarter's review commentsMartin Odersky2016-10-022-3/+3
|
* CleanupsMartin Odersky2016-10-022-5/+4
| | | | | Better comments and refactorings that move some things around so that less modules depend on Inliner.
* Move logic from InlineInfo to BodyAnnotMartin Odersky2016-10-023-2/+11
| | | | Now that we have BodyAnnot, InlineInfo can be eliminated.
* Use BodyAnnot to indicate rhs of inline methodMartin Odersky2016-10-024-11/+41
| | | | | | 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-021-1/+1
| | | | | | | | 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.
* Inline function parametersMartin Odersky2016-10-021-1/+1
| | | | | | Add inline function parameters. The previous concept of inlineable closure is adapted to coincide with an inline function parameter.
* Drop annotations from dealiasMartin Odersky2016-10-021-10/+22
| | | | | | | | | | | | 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.
* Always use implicit context at the current periodMartin Odersky2016-10-021-2/+5
| | | | | | | | | | | | | | | An implicit method might be unpickled in one run and the implicit body might be selected first in a subsequent run. In that case the inlined code was read with the original context, but that context needs to run at the current period. This resulted in denotation out of date errors in bringForward. Another problem with this design was space leaks: An context might survive multiple runs as part of an ImplicitInfo of an unpickled method. The new design avoids both problems. Implicit contexts are always up to date and leaks are avoided.
* Add inline for valsMartin Odersky2016-10-023-1/+22
| | | | | | | | | | - allow inline as an alternative to final for vals (final is retained for backwards compatibility for now) - allow inline for parameters - check that rhs of inline value has a constant type - check that arguments to inline value parameters have constant type - check that inline members are not deferred - make inline members effectively final
* Make inline methods and field effectively finalMartin Odersky2016-10-022-2/+2
|
* Make inline a keywordMartin Odersky2016-10-022-1/+5
| | | | | | | `inline` is now a modifier keyword. To keep disruption tolerable, we still allow `@inline` as an annotation as well. Other uses of `inline` are supported only under `-language:Scala2` and are rewritten to identifiers in backticks.
* Refactoring for registering InlineInfoMartin Odersky2016-10-022-5/+12
| | | | | | 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.
* Better names and documentation for Inliner.Martin Odersky2016-10-021-1/+1
|
* Add accessors for non-public members accessed from inline methodsMartin Odersky2016-10-026-4/+32
| | | | | | | | 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.
* Better toString for TermRefWithSigMartin Odersky2016-10-021-0/+1
|
* Make inline annotation @scala.inline.Martin Odersky2016-10-022-2/+2
| | | | | | | | | | | | | | | | | | 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.
* Inline key operations in dottyMartin Odersky2016-10-021-1/+1
| | | | | Inlined operations are: Stats.track and all variants of Reporter.traceIndented.
* Better error message in TreePicklerMartin Odersky2016-10-021-2/+1
| | | | Print what was pickled when failing with unresoilvced symbols.
* Fix problems handling types in InlinerMartin Odersky2016-10-021-4/+3
| | | | | | | | 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.
* Handle outer this in InlinerMartin Odersky2016-10-022-1/+2
| | | | Also, do some refactorings and fix some bugs in Inliner.
* Add comment missing from last PRMartin Odersky2016-10-021-0/+12
|
* Fix some problems in InlinerMartin Odersky2016-10-021-4/+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.
* Set the positions of inlined trees wehn read form TastyMartin Odersky2016-10-028-159/+103
| | | | | | | | | | | 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.
* Support separate compilationMartin Odersky2016-10-021-0/+7
| | | | | Inline trees can now be read form TASTY. However, positions are not set correctly. This remains to be implemented.
* Simplify enclosingInlinedsMartin Odersky2016-10-022-8/+3
| | | | | - represent directly as a list - can replace separate inlineCount
* Print inlining positions in error messagesMartin Odersky2016-10-022-8/+14
| | | | | Error messages now print the inlined positions as well as the position of the inlined call, recursively.
* Track Inlined nodes in ctx.sourceMartin Odersky2016-10-021-3/+7
|
* Add Inlined tree nodeMartin Odersky2016-10-021-0/+10
| | | | | | | | | ... 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-5/+10
| | | | To do this, factor out Key from Attachment into a new type, Property.Key.
* First version of inline schemeMartin Odersky2016-10-024-7/+18
| | | | | To be done: outer accessors To be done: error positions
* Make namePos a member of memberDefMartin Odersky2016-09-291-1/+4
| | | | | That way it can be accessed by other parts which deal with error messages.
* Make Modifiers untyped only.Martin Odersky2016-09-282-3/+4
| | | | | The typed variant is no longer needed. This means modifiers can safely be ignored in typed trees if we so choose.
* Get rid of SelectFromType tree node.Martin Odersky2016-09-251-1/+1
| | | | | | 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.
* Drop PairMartin Odersky2016-09-254-11/+5
| | | | | | | | Drop tree node class 'Pair'. It was used only in imports, where it can easily be replaced by Thicket. The envisaged use for generic pairs is almost sure better modelled by a "Pair" class in Dotty's standard library.
* Swap order of elements in AnnotatedMartin Odersky2016-09-241-1/+1
| | | | | | | | | Now it's annotated first, annotation second. This is in line with AnnotatedType and in line with the principle that tree arguments should come in the order they are written. The reason why the order was swapped before is historical - Scala2 did it that way.
* Merge pull request #1534 from OlivierBlanvillain/clean-up-printersFelix Mulder2016-09-2311-11/+10
|\ | | | | Clean up config.Printers imports
| * Clean up config.Printers importsOlivier Blanvillain2016-09-2311-11/+10
| | | | | | | | And remove the not used Printer#echo