aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala
Commit message (Collapse)AuthorAgeFilesLines
* Lazy entering of names with internal $'s in package scopesMartin Odersky2017-04-111-1/+1
| | | | | | | | | | | | | | | | Names with internal $'s are entered in package scopes only if - we look for a name with internal $'s. - we want to know all the members of a package scope This optimization seems to be fairly effective. The typical range of package scopes that need $-names is between 0 and 20%. The optimization seems to improve execution time of all unit tests by about 3%. Also. drop the inheritance from Iterable to Scope. The reason is that we now need a context parameter for toList and other Iterable operations which makes them impossible to fit into the Iterable framework.
* Make outer select names semanticMartin Odersky2017-04-111-4/+6
|
* replace derived{Method,Poly}Type with derivedLambdaTypeMartin Odersky2017-04-061-1/+1
|
* Merge pull request #2043 from dotty-staging/tailrec-derivesFromDmitry Petrashko2017-03-151-1/+3
|\ | | | | Tailrec for derivesFrom/lookupRefined/classSymbol/classSymbols
| * Add @tailrec to avoid regressions.Nicolas Stucki2017-03-011-1/+3
| |
* | Construct MethodTypes from parameter closureMartin Odersky2017-03-141-3/+3
|/ | | | | To allow for dependencies between method type parameters, construct MethodTypes from a closure that maps the currently constructed MethodType to its parameter types.
* Harden outer proxy computation of inlined codeMartin Odersky2017-02-191-15/+17
| | | | | | | | | | | It turns out that we simply cannot do reliable outer path computation that fills in the right hand sides of this-proxies from the types of these proxies. As-seen-from logic can mangle the types of proxies enough to scramble the necessary information. What we now do instead is simply count: We record the number of outer accesses to an outer this in inlineable code, and do the same number of outer accesses when computing the proxy.
* Fix default parameter value.Martin Odersky2017-02-181-1/+1
| | | | | | | Interesting that the tests pass even if we always assume outOfContext = true. So this raises the question why have a flag? It's just that I am not sure the `outOfContext` behavior is correct in all cases. So I prefer to be conservative here.
* Fix #1990: Handle case where inlining changes class of outerMartin Odersky2017-02-181-4/+11
| | | | | | | | | | The new situation in the test was that outer of the inlined method was `A` but it's as seen from type is a subtype `B`. We need two fixes: - Ignore outerSelects in TreeChecker. These are treated as having fixed symbols. - Adapt the outer-path logic to deal with code that's moved to another context.
* Address reviewer commentsMartin Odersky2017-01-041-1/+1
|
* Fix #1865: Compute outer path at right phaseMartin Odersky2017-01-031-1/+2
| | | | | When computing the outer path, we need to be careful to dealias before erasure, even if the outer path is demanded during erasure. Otherwise we lose prefixes.
* address review: rename hasOuterFlag to clsHasOuterliu fengyun2016-12-201-3/+3
|
* refine previous commitliu fengyun2016-12-191-2/+2
|
* Fix #1820: condition of whether generates outerliu fengyun2016-12-191-1/+2
| | | | | | | | | | | | | | | | | | Previously, we don't generate `outer` for the anonymous class `new Inner2 {}`. This is incorrect, as `Inner2 {}` extends `A.Inner`, which requires an outer. trait A { val a = "a" trait Inner { def f = println(a) def h = 3 } } trait B extends A { trait Inner2 extends Inner new Inner2 {} }
* fix #1820: make sure outer of traits implementedliu fengyun2016-12-181-7/+12
|
* Merge pull request #1767 from dotty-staging/fix-#1755odersky2016-12-171-2/+21
|\ | | | | Fix #1755: Make sure references in outer args are accessible
| * Fix #1755: Make sure references in outer args are accessibleMartin Odersky2016-12-021-2/+21
| | | | | | | | | | | | | | Needed a fixup action in ExplicitOuter to avoid references to module's This from outside their scope. The problem is fixed, but I wish I understood better the root cause.
* | Fix #1806: Define outer accessors at the right phaseMartin Odersky2016-12-161-1/+2
| | | | | | | | | | | | | | | | | | Some outer accessors were defined at phase explicitOuter, but were entered into the scope of their enclosing class only at phase explicitOuter + 1. This turned them to stale symbols when trying to access them at a later run, because at their initially valid phase they were not found as members of their owner.
* | Fix-1756: Use lexically enclosing class as start of outer path.Martin Odersky2016-12-021-1/+1
|/ | | | | | We confused the enclosing class (which skips the current class in super call contexts) and the lexically enclosing class in three locations that all had to do with the start of an outer path.
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-0/+362