aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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-025-16/+24
| | | | | | 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-023-7/+48
| | | | | | 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-025-59/+222
|
* 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-0212-34/+187
| | | | | | | | 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 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.
* Better toString for TermRefWithSigMartin Odersky2016-10-021-0/+1
|
* Suppress inlining printingMartin Odersky2016-10-021-1/+1
|
* Handle Inlined blocks on ElimErasedValueTypeMartin Odersky2016-10-021-0/+3
|
* 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-028-39/+28
| | | | | | | | | | | | | | | | | | 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.
* Juggling with close in RefinedPrinterMartin Odersky2016-10-021-10/+7
| | | | | | 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.
* 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.
* Inline key operations in dottyMartin Odersky2016-10-023-18/+29
| | | | | 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-022-15/+8
| | | | | | | | 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-022-3/+5
| | | | | | | | 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 problem with homogenize treesMartin Odersky2016-10-021-1/+1
|
* 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-023-4/+10
| | | | | 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-027-34/+40
| | | | Also, do some refactorings and fix some bugs in Inliner.
* Drop Inlined when homogenizeMartin Odersky2016-10-021-2/+7
| | | | Pickler drops Inlined nodes, so homogenize needs to do the same.
* Harden Inliner.sourceFileMartin Odersky2016-10-021-1/+1
|
* Don't inline after typer.Martin Odersky2016-10-021-1/+3
| | | | | Safety measure: Inline only during typer, not when code is generated in later phases.
* Add comment missing from last PRMartin Odersky2016-10-021-0/+12
|
* Fix some problems in InlinerMartin Odersky2016-10-024-27/+33
| | | | | | | | | | | | | | 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-0210-162/+107
| | | | | | | | | | | 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-022-3/+10
| | | | | Inline trees can now be read form TASTY. However, positions are not set correctly. This remains to be implemented.
* Simplify enclosingInlinedsMartin Odersky2016-10-023-24/+10
| | | | | - represent directly as a list - can replace separate inlineCount
* Fix stack overflow on recurs in namerFelix Mulder2016-10-021-4/+4
|
* Don't expand stat before recursion in namerFelix Mulder2016-10-021-2/+2
| | | | | Dottydoc needs the unexpanded trees so that it can have access to the attached docstring
* Avoid simple aliases in bindingsMartin Odersky2016-10-021-53/+66
| | | | | | | | | Avoid bindings such as type T = T' val x: x'.type = x' Required some refactorings in Inliner.
* Implement inline ifMartin Odersky2016-10-022-1/+14
| | | | Inline conditionals with constant conditions
* Print inlining positions in error messagesMartin Odersky2016-10-025-23/+42
| | | | | 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-023-4/+30
|
* Add Inlined tree nodeMartin Odersky2016-10-0210-5/+94
| | | | | | | | | ... 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-029-26/+39
| | | | To do this, factor out Key from Attachment into a new type, Property.Key.
* First version of inline schemeMartin Odersky2016-10-0213-12/+257
| | | | | To be done: outer accessors To be done: error positions
* Namer refactoingMartin Odersky2016-10-021-30/+31
| | | | | - DRY - Refactor out special path operations
* Make namePos a member of memberDefMartin Odersky2016-09-293-14/+20
| | | | | That way it can be accessed by other parts which deal with error messages.
* Make Modifiers untyped only.Martin Odersky2016-09-284-63/+58
| | | | | 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-263-10/+10
| | | | | | 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-268-46/+28
| | | | Prefer to access directly via symbol.
* Simplify typedSelect logicMartin Odersky2016-09-251-25/+22
|
* Eliminate SelectFromTypeTree from docsMartin Odersky2016-09-252-6/+2
|
* Get rid of Thicket(List(...)) as an expressionMartin Odersky2016-09-252-6/+6
| | | | Thicket has a vararg constructor, so this syntax is redundant.
* Get rid of SelectFromType tree node.Martin Odersky2016-09-2514-115/+51
| | | | | | 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.