| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
eligibility.
Unless we do this, typevars would sneak into eligibility checks.
|
|
|
|
| |
MethodTypes and PolyTypes now check their argument for compatibility before setting up a complete isApplicable test.
|
|
|
|
|
|
| |
needed a lot for implicit search.
We need to use a less common name for Predef.conforms!
|
|
|
|
| |
Previous one was a no-op, because <init> is excluded from Name#encode
|
|
|
|
| |
Also: Standardized on selectorName; Translate $init$ to <init> when unpickling.
|
|
|
|
| |
Trait constructors are now also called <init>. When expanding traits we might want to use IMPLCLASS_CONSTRUCTOR.
|
|
|
|
|
| |
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 "$".
|
|
|
|
| |
It was forgotten in desugaring, and in any case would be difficult to do as a desugaring operation, because the transformation is non-local.
|
| |
|
| |
|
|
|
|
| |
Also, special treatment of <init>, which is not encoded.
|
|
|
|
| |
With various other small changes.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Moving Positions, Chars to new packages.
Added Source positions.
Added untyped trees module.
Factored out behavior between typed and untyped trees.
|
|
|
|
| |
Also improvements to toString.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
| |
|
|
LocalNames.
|