aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/typer
Commit message (Collapse)AuthorAgeFilesLines
* Improve positions for MemberDefs using `namePos`Felix Mulder2016-10-102-5/+5
|
* Fix TypeMismatch not getting nonsensical tags in some casesFelix Mulder2016-10-101-3/+3
| | | | Thanks @smarter!
* Fix reporting of ErrorTypes in highlighted segmentsFelix Mulder2016-10-101-1/+1
|
* Refactor explanation interpolatorFelix Mulder2016-10-103-14/+14
|
* Make relevant parts of compiler conform to new error handlingFelix Mulder2016-10-102-7/+8
|
* Add modifiers to highlightingFelix Mulder2016-10-101-3/+3
|
* Add `MissingIdent` message to `Typer`Felix Mulder2016-10-101-2/+3
|
* Complete better structure to diagnostic messagesFelix Mulder2016-10-101-3/+2
|
* Rename Diagnostic to diagnostic.MessageFelix Mulder2016-10-101-1/+0
|
* Change layout of ErrorMessagesFelix Mulder2016-10-101-1/+2
|
* Add more examples to TyperFelix Mulder2016-10-101-10/+14
|
* Separate `ContextDocstrings` from `Context` and make it pluggableFelix Mulder2016-10-063-43/+60
|
* Implement docbase as propertyFelix Mulder2016-10-062-25/+30
|
* Typecheck usecases in fresh local scopeFelix Mulder2016-10-061-2/+1
|
* Move docstring cooking to dottyFelix Mulder2016-10-061-7/+10
|
* Fix cooking of docstringsFelix Mulder2016-10-062-20/+36
|
* Move typing of usecases to `typedClassDef`Felix Mulder2016-10-061-3/+4
|
* Fix type parameters not getting properly typedFelix Mulder2016-10-061-4/+15
|
* Typecheck usecasesFelix Mulder2016-10-062-1/+12
|
* Fix inline failure in the presence of unit conversionMartin Odersky2016-10-021-1/+3
|
* Address @smarter's review commentsMartin Odersky2016-10-022-8/+11
|
* CleanupsMartin Odersky2016-10-022-25/+3
| | | | | 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-110/+49
| | | | Now that we have BodyAnnot, InlineInfo can be eliminated.
* Use BodyAnnot to indicate rhs of inline methodMartin Odersky2016-10-021-10/+10
| | | | | | 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-20/+32
| | | | | | | | 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-022-20/+24
| | | | | | Add inline function parameters. The previous concept of inlineable closure is adapted to coincide with an inline function parameter.
* Change owner as necessary when typing a TypedSpliceMartin Odersky2016-10-024-6/+20
| | | | | | | | | | | | 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-5/+15
| | | | | The body might still refer to an inline closure argument without fully applying it. In that case the binding may not be dropped.
* Always use implicit context at the current periodMartin Odersky2016-10-023-20/+31
| | | | | | | | | | | | | | | 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.
* Document deviations from inline SIPMartin Odersky2016-10-021-0/+7
|
* Add inline for valsMartin Odersky2016-10-023-2/+16
| | | | | | | | | | - 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
* Add accessibility check for type of newMartin Odersky2016-10-021-0/+1
|
* Fix problem related to accessor generation under separate compilationMartin Odersky2016-10-023-5/+22
| | | | | | | Accessors were multiply generated under separate compilation. To fix this, the resident body of an inlined function is now the same as the inlined body. Both use accessors where necessary. Previously, only the inlined body used accessors.
* Make inline a keywordMartin Odersky2016-10-021-1/+14
| | | | | | | `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.
* Don't add inline accessors twiceMartin Odersky2016-10-022-5/+7
| | | | | | | 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.
* Refactoring for registering InlineInfoMartin Odersky2016-10-023-11/+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.
* Fix bug in InlineableClosureMartin Odersky2016-10-021-3/+3
|
* Inline argument closures to inline methodsMartin Odersky2016-10-022-5/+40
| | | | | | 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-023-57/+207
|
* Support access for setting private vars from inlined codeMartin Odersky2016-10-021-42/+55
|
* Add accessors for non-public members accessed from inline methodsMartin Odersky2016-10-023-28/+139
| | | | | | | | 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.
* Fix problem affecting recursive inlinesMartin Odersky2016-10-022-5/+10
| | | | | | 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.
* Make inline annotation @scala.inline.Martin Odersky2016-10-022-24/+20
| | | | | | | | | | | | | | | | | | 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.
* Harden ReTyper so that it's fit for inliningMartin Odersky2016-10-023-2/+13
| | | | | | | 1. Imlement typedUnapply 2. Disable implicit view searches and searches for equality checks - these should have already happened in the first typer run.
* Fix problems handling types in InlinerMartin Odersky2016-10-021-11/+5
| | | | | | | | 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.
* Better diagnostics for TreeCheckerMartin Odersky2016-10-021-1/+2
| | | | | | | | 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.
* Fix bugs related to type parameter remappingMartin Odersky2016-10-021-1/+2
| | | | | - Remap typerefs - Register types in TypeTrees
* Avoid reference to local bindings in Inlined nodesMartin Odersky2016-10-022-3/+9
| | | | | To do this, use a proper TypeAssigner for Inlined, analogous to how we type Blocks.
* Move InlineTyper to Inliner classMartin Odersky2016-10-021-31/+31
| | | | Keeping as a static object causes suspected dataraces.
* Handle outer this in InlinerMartin Odersky2016-10-021-30/+28
| | | | Also, do some refactorings and fix some bugs in Inliner.