aboutsummaryrefslogtreecommitdiff
path: root/compiler/src/dotty/tools/dotc/core/SymDenotations.scala
Commit message (Collapse)AuthorAgeFilesLines
* Adapt isPackageObject to semantic namingMartin Odersky2017-04-111-2/+4
| | | | Used a hardcoded string before, which caused test failures.
* Lazy entering of names with internal $'s in package scopesMartin Odersky2017-04-111-10/+11
| | | | | | | | | | | | | | | | 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.
* Keep package member names mangledMartin Odersky2017-04-111-3/+10
| | | | | | | | | Once we start using unencoded operators internally, we will face the problem that one cannot decode realiably a class file filename. We therefore turn things around, keeping members of package scopes in mangled and encoded form. This is compensated by (1) mangling names for lookup of such members and (2) when unpickling from Scala 2 info or Tasty, comparing mangled names when matching a read class or module object against a root.
* Further simplification for NameMartin Odersky2017-04-111-3/+3
|
* Names are no longer SeqsMartin Odersky2017-04-111-1/+1
| | | | | | | | Drop Seq implementation of name. This implementation was always problematic because it entailed potentially very costly conversions to toSimpleName. We now have better control over when we convert a name to a simple name.
* Revise qualified namesMartin Odersky2017-04-111-32/+21
| | | | | 1. Fix problem in fullNameSeparated 2. Revise expandedName operations
* Rename NameExtractor -> NameKindMartin Odersky2017-04-111-3/+3
|
* Make freshName semanticMartin Odersky2017-04-111-3/+3
|
* Add ShadowedName and AvoidClashNameMartin Odersky2017-04-111-1/+1
|
* Get rid of ExpandedName flagMartin Odersky2017-04-111-4/+2
|
* Drop Config.semanticNames optionMartin Odersky2017-04-111-2/+2
| | | | | We now handle only semantic names. Also, name extractor tags and TASTY name tags are now aligned.
* Add NameExtractorsMartin Odersky2017-04-111-4/+4
| | | | | Use a new scheme for creating and accessing semantic names which is based on semantic name extractors with nested info classes.
* Semantic SuperAccessor and Initializer namesMartin Odersky2017-04-111-4/+2
|
* Add Variant NameInfoMartin Odersky2017-04-111-12/+12
| | | | Plus further bug fixes.
* Handle expansion and flatteningMartin Odersky2017-04-111-2/+4
|
* PolishingsMartin Odersky2017-04-111-2/+2
|
* Bug fixesMartin Odersky2017-04-111-13/+4
| | | | nameddefaults.scala now compiles without crashing
* Implement startsWith/encode/decode for derived names.Martin Odersky2017-04-111-1/+1
|
* Fix typos and redundant statements in previous commitsMartin Odersky2017-04-111-2/+1
|
* Self-checked structured qualified namesMartin Odersky2017-04-111-4/+27
| | | | | | This is a temporary step. If semanticNames is true we construct structured qualified names, but check they have the same string representation as the unstructured names.
* Fix documentationMartin Odersky2017-04-091-4/+3
|
* Three fixes wrt handlings of package objectsMartin Odersky2017-04-091-21/+52
| | | | | | | | 1. Invalidate packageObj cache when entering a package object 2. Prefer package object members over same-named package members unless we are in the scala package 3. Exclude package objects from no-double-bindings checks, since package objects may now be visited before indexing them.
* Refactorings for efficiencyMartin Odersky2017-04-061-3/+3
| | | | | | | | | - split LambdaType.equals into two equals so that tests are more specific (also avoids type testing against a trait) - re-order cases in some pattern matches with the aim to (1) move common cases earlier, (2) move more expensive trait type tests later.
* Merge MethodType and PolyType functionality where possibleMartin Odersky2017-04-061-2/+1
| | | | | | Two benefits: (1) less code. (2) finding subtle bugs about parameter dependent method types. By merging with PolyTypes we are forced to take parameter dependencies into account.
* Further refactoringsMartin Odersky2017-04-061-1/+1
| | | | | - Use TypeLambda instead of PolyType. - Further harmonize factory operations
* Harmonize paramTypes and paramBoundsMartin Odersky2017-04-061-2/+2
| | | | | | MethodTypes have paramTypes whereas PolyTypes have paramBounds. We now harmonize by alling both paramInfos, and parameterizing types that will become common to both.
* More fine-grained distinctions when flags are defined.Martin Odersky2017-04-041-4/+9
| | | | | | | | | | | | | | Flags like Trait are in fact not always defined when a symbol is created. For symbols loaded from class files, this flag, and some other is defined only once the classfile has been loaded. But this happens in general before the symbol is completed. We model this distinction by separating from the `FromStartFlags` set a new set `AfterLoadFlags` and distinguishing between the two sets in `SymDenotations#is`. Test case is enum-Option.scala. This erroneously complained before that `Enum` was not a trait.
* Merge pull request #2043 from dotty-staging/tailrec-derivesFromDmitry Petrashko2017-03-151-2/+2
|\ | | | | Tailrec for derivesFrom/lookupRefined/classSymbol/classSymbols
| * Add @tailrec to avoid regressions.Nicolas Stucki2017-03-011-2/+2
| |
* | Fix #2066: Don't qualify private members in SelectionProto's...Martin Odersky2017-03-121-0/+4
| | | | | | | | ... unless they would be accessible in the given context.
* | Fix #2067: Compute defKind at Typer, not NamerMartin Odersky2017-03-081-1/+1
| | | | | | | | | | | | | | It's hard to predict for defKind all the desugarings that can be applied to a definition. Better to do it once the desugarings have been applied. NoInit and PureInterface are both tested only after Typer, so it's OK to delay their initialization until regular Typer.
* | Drop named type parameters in classesMartin Odersky2017-03-041-16/+1
|/ | | | | | | | | | | | | Drop the [type T] syntax, and what's associated to make it work. Motivation: It's an alternative way of doing things for which there seems to be little need. The implementation was provisional and bitrotted during the various iterations to introduce higher-kinded types. So in the end the complxity-cost for language and compiler was not worth the added benefit that [type T] parameters provide. Noe that we still accept _named arguments_ [A = T] in expressions; these are useful for specifying some parameters and letting others be inferred.
* Workaround #1895: Bringing a symbol to a new run is brokenGuillaume Martres2017-01-281-3/+7
|
* Make errors are not swept under the carpetMartin Odersky2016-12-171-5/+6
| | | | | | | | | Typer#ensureReported's comment outlines an example where errors could go unreported, resulting in error trees after typer without any reported error messages. This commit makes sure that at least one error is reported if a tree node has an error type. Fixes #1802.
* Drop explicit types for local implicit valsMartin Odersky2016-12-121-1/+1
| | | | | Drop explicit types for local implicit vals of type Context and Position. Exercises the functionality and shortens the code.
* Move compiler and compiler tests to compiler dirFelix Mulder2016-11-221-0/+2004