aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/StdNames.scala
Commit message (Collapse)AuthorAgeFilesLines
* Fix of t1236: higher-kindedMartin Odersky2014-03-211-2/+6
| | | | | | | | | | | | | | | | | (and also of t0625, which reappeared). Several fixes were made. In summary: 1. Naming and representation of KigherKinded traits changed. It's now $HigherKinded$NIP where the letters after the second $ indicate variance (N)egative, (I)nvariant, (P)ositive. The HKtraits themselves are always non-variant in their parameters. 2. When deriving refined types over higher-kinded types, the variance of a type alias is the variance of the new type constructor. 3. isSubTypeHK was changed, as was the position from where it is called. 4. appliedTo also works for PolyTypes.
* Add language feature mechanismMartin Odersky2014-03-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | Add a method "featureEnabled" that checks whether a feature is enabled. Features can be enabled by imports or by command-line options. The Scala 2.10 way of enabling features by implicits got dropped, because the use of the feature mechanism is now different. Previously, features imposed restrictions on what used to work. So it was important to offer way to avoid the restrictions it that was as smooth as possible, and implicits fit the bill. Furthermore, features did not change the way things were compiled, so it was OK to test them only once all types were compiled. Now, features are essentially switches that change compile time behavior. keepUnions and noAutoTupling, if on, will modify the way type inference works. So we need to interprete a switch on the spot, and doing an implicit search to determine a switch value is too dangerous in what concerns causing cyclic references. At the same time, because we are dealing with new functionality, there is less of a concern for being able to set or reset features for large pieces of code with some implicit. You could argue that's not even desirable, and that an explicit import or command line option is preferable. Conflicts: src/dotty/tools/dotc/core/SymDenotations.scala
* LazyVals phase.Dmitry Petrashko2014-03-191-0/+1
| | | | | | | | | | | | | | | Creates accessors for lazy vals: 1) lazy local vals are rewritten to dotty.runtime.Lazy*** holders 2) for a non-volatile field lazy val create a non-thread-safe accessor and flag: 2.a) if lazy val type indicates that val is not nullable, uses null value as a flag 2.b) else uses boolean flag for sake of performance, method size, and allowing more jvm optimizations 3) for a volatile field lazy val use double locking scheme, that guaranties no spurious deadlocks, using long bits as bitmaps and creating companion objects to store offsets needed for unsafe methods. Conflicts: test/dotc/tests.scala
* Make argument types of viewproto undergo WildApprox before testing for ↵Martin Odersky2014-02-011-0/+2
| | | | | | eligibility. Unless we do this, typevars would sneak into eligibility checks.
* Add early discarding of methods for eligible check.Martin Odersky2014-01-291-3/+2
| | | | MethodTypes and PolyTypes now check their argument for compatibility before setting up a complete isApplicable test.
* Removing conforms from StdNames because it shadows Predef.conforms, which is ↵Martin Odersky2014-01-101-1/+1
| | | | | | needed a lot for implicit search. We need to use a less common name for Predef.conforms!
* Making encode stick on <init>Martin Odersky2013-12-081-1/+2
| | | | Previous one was a no-op, because <init> is excluded from Name#encode
* Fixes for desugarings of case classes.Martin Odersky2013-12-071-0/+2
| | | | Also: Standardized on selectorName; Translate $init$ to <init> when unpickling.
* Dropping TRAIT_CONSTRUCTOR name.Martin Odersky2013-12-061-2/+1
| | | | Trait constructors are now also called <init>. When expanding traits we might want to use IMPLCLASS_CONSTRUCTOR.
* Caching asSeenFrom on denotations.Martin Odersky2013-10-231-0/+1
| | | | | The last asSeenFrom on a SingleDenotation is cached. Also, correction of effectiveOwner in SymDenotation, which needs to understand that module classes now end in a "$".
* Added wildcard argument handling to parsingMartin Odersky2013-08-251-0/+1
| | | | It was forgotten in desugaring, and in any case would be difficult to do as a desugaring operation, because the transformation is non-local.
* Various bug fixes for typer.Martin Odersky2013-08-221-4/+2
|
* wip namer.Martin Odersky2013-05-281-0/+1
|
* NameTransformer.encode now goes from names to names.Martin Odersky2013-05-241-1/+2
| | | | Also, special treatment of <init>, which is not encoded.
* Added desugaring.Martin Odersky2013-05-221-0/+1
| | | | With various other small changes.
* Modifications in prepation of parsing.Martin Odersky2013-04-231-0/+2
|
* Added symbolic XML builderMartin Odersky2013-04-191-2/+2
|
* Added some predefined methods in Definitions.Martin Odersky2013-04-191-0/+12
|
* Scanners added.Martin Odersky2013-04-171-1/+0
| | | | | | | Moving Positions, Chars to new packages. Added Source positions. Added untyped trees module. Factored out behavior between typed and untyped trees.
* Added emulation of higher-kinded types.Martin Odersky2013-03-171-0/+6
| | | | Also improvements to toString.
* Polishing of denotationsMartin Odersky2013-03-021-1/+0
| | | | | | | | 1. Dropped owner from denot#asSeenFrom. Code inspection shows that one needs to take the owner of the symbol in each alternative instead. 2. Changed fullName so that terms in the ownerchain leave a trace. Needed for disambiguating private symbols with expanded names. See worksheet nesting.sc for an example. 3. Changed fingerPrint so that only classes with children have their fingerPrints computed. Reason: When we lookup a member of a class initially, it's likely that the member is present, so a bloom filter will not buy us much and will take up memory. For parent classes it's different. We might have found the member already in the child, or in a different parent, so it's more likely that the fingerPrint is effective.
* Added new utility methods to SymDenotations and refactored creation.Martin Odersky2013-02-081-1/+1
|
* Various additions and improvements, in preparation for addition of unpicklers.Martin Odersky2013-02-061-0/+1
|
* Various smallish fixes.Martin Odersky2013-01-311-2/+2
|
* Fleshed out definitions and class loading architecture.Martin Odersky2013-01-311-11/+4
|
* Swiztched to name table, added StdNames and related definitions. Introduced ↵Martin Odersky2013-01-301-0/+728
LocalNames.