| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
MethodTypes and PolyTypes now check their argument for compatibility before setting up a complete isApplicable test.
|
| |
|
| |
|
|
|
|
|
|
| |
They no longer can be accidentally equal to refinement type.
Todo: Disentangle selection protos entirely from Refinement types? See branch disentangle-selectproto.
|
|
|
|
| |
We now track eligible calls and the number of refs tested in an eligible call.
|
|
|
|
|
|
| |
We cache SelectionProtos if their "compat" parameter is "NoViewsAllowed". We always cache ViewProtos.
That's important for implicit search, because this enables eligible refs to be better cached. To make this work, we add a case to WildApprox which massages SelectionProtos so they also get noViewsAllowed in the compat parameter.
|
|
|
|
| |
narrow is exercised a lot after the improvement to normalize. So it's important to cache it in order not to bust `uniques` with NoprefixTermRefs.
|
|
|
|
| |
This lets us streamline normalize, and avoid to create FunctionTypes if the expected type is a FunProto or ViewProto.
|
| |
|
|
|
|
|
|
|
|
| |
To avoid to always create a type before checking its uniqueness we specialize on the three most common categories: RefinedTypes, TypeBounds and NamedTypes.
Each category gets its own uniques map. Hashing is disentangled from Types.
The new treatement seems to give some improvement (2-5%?) but not much.
|
|
|
|
| |
of type itself.
|
|
|
|
|
|
|
|
|
|
|
| |
Now, PolyTypes, BoundTypes and TypeVars are cached, too. This leads to the following changes:
- unique types table 135K -> 310K
- uncached types 923K -> 0.5K (these are types that are cachable, but contain an uncached part)
- cached type allocs 3420K -> 4322K
- runtime on dotc (24KLOC) 31sec -> 20sec
So, it's a big net win, but we should watch the size of the uniue types table; possibly make it weak.
|
|
|
|
|
|
| |
To save time we handle these directly, rather than looking for implicit conversions. Reason: this saves time (looks like 5-10% of frontend), and we know these are always available.
The scheme would be foiled if someone introduced additional implicit conversions between numeric types. We could detect and forbid that.
|
| |
|
|
|
|
| |
Previous flagsString is no longer accessible. Have to use Dotty's mechanism to show flags,
|
| |
|
|
|
|
| |
That way they can be easily removed by search and replace, which gives us a clearer picture of the runtime profiles.
|
|
|
|
| |
Will need to call from type comparer if instantiations were delayed
|
|
|
|
|
|
|
|
| |
In particular, need to unify polyparams before replacing one with the other, if the result wiould lead to a cyclic constraint.
Also: Avoid setting `inst` field of a type variable if a subtype operation is in progress, because the constraint might be retracted, and the instantiation should be retracted with it.
Third, tighter checks of cyclic constraint, and deep subtype recursions can now be demanded to cause an abort.
|
|
|
|
|
|
|
| |
1. The occursInCheck hat its logic crossed, which led to some cycles in constraints not being detected.
2. The logic around addConstraint skipped some necessary comparisons when frozenConstraint was set.
Fixing the addConstraint logic created new subtype cases which made constraints cyclic without that fact being detected.
|
| |
|
|
|
|
| |
... to avoid making long methods that are hard to optimize. Also: the named part of second try is now executed also if the rhs is a named type.
|
|
|
|
| |
This is to avoid to instantiate a GADT with a an approximated bound. We need to treat GADTs the same way as PolyParams.
|
|
|
|
| |
To make this work we moved the basetype test to thirdTryNamed where the lhs does not need to be a named type.
|
|
|
|
|
|
|
|
| |
Implements
(A | B)(x) ==> A(x) | B(x)
in phase 2 of subtype checking. This is useful because it ensures that certain subtype judegments that should be correct are correct. It might also help prune the search space earlier.
|
| |
|
| |
|
|\
| |
| | |
Build infrastructure
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
Reason: This works even for typeRefs with joint-ref denotations, even if the symbol does not exist. The only reason to use symbol.isAliasType is if info.isAlias can produce a cycle.
|
|
|
|
| |
Caused a cyclic reference error when compiling the three files in test "testNonCyclic".
|
|
|
|
| |
As of previous commit, Namer will take care of it.
|
|
|
|
| |
Also: forward type parameter references of newly added to class scope. This is necessary, or the pattern match in test.scala would fail. Need to find out why.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If we look for aprototype of the form
select(name, FunProto(args, ...))
it's important that the result type of the FunProto type is a wildcard type, because implicit views are disabled for that match.
--- this commit achieves the first bootstrap of dotty! ---
|
| |
|
|
|
|
| |
It needs to follow type aliases in order not to give false indications what variables are contained in a type.
|
|
|
|
| |
For packages, the implicit scope consists of the implicit definitions in a nested `package` object, not the package itself.
|
|
|
|
|
|
| |
Needed a refactoring of fullname to be able to refer to fullName without passing a context explicitly.
Also, relax isAccessible check. The prefix condition for protected access need not hold for constructors.
|
| |
|
| |
|
|
|
|
| |
When opening overloaded definitions we need to avoid replacing existing symbols.
|
|
|
|
| |
Without such invalidation, the previous classfile loader stays active, which will lead to confusion later on.
|