aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Cheaper eligibility test for PolyTypes.Martin Odersky2014-02-022-10/+18
| | | | Instead of doing a wildApprox of the whole type, we fuse with the logix for method types and just do a wild approx of the single method type argument we have to test.
* Fix checking for disabled root importsMartin Odersky2014-02-022-5/+16
| | | | Needs to be done always when hitting a wildcard import, not just when something was found
* Rename dotty.Predef -> dotty.DottyPredefMartin Odersky2014-02-022-2/+2
| | | | to avoid accidental confusion with scala.Predef
* Refactoring implicit discardsMartin Odersky2014-02-012-27/+42
| | | | | (1) Moved into refMatches, to avoid normalize on references that are discarded anyway (2) Added another check if the expected type is a value class
* Revert "Dropping a type annotation, which is no longer needed."Martin Odersky2014-02-011-1/+2
| | | | This reverts commit 7cb292fad14dc9ee7f1325f83df0328ffa8f2194.
* Make argument types of viewproto undergo WildApprox before testing for ↵Martin Odersky2014-02-013-15/+25
| | | | | | eligibility. Unless we do this, typevars would sneak into eligibility checks.
* Dropping a type annotation, which is no longer needed.Martin Odersky2014-01-311-2/+1
|
* Replacing most occurrences of HashMap with AnyRefMapMartin Odersky2014-01-307-31/+43
|
* Performance improvements to NamedType#denotMartin Odersky2014-01-301-29/+48
|
* Add early discarding of methods for eligible check.Martin Odersky2014-01-292-6/+33
| | | | MethodTypes and PolyTypes now check their argument for compatibility before setting up a complete isApplicable test.
* Better implicit loggingMartin Odersky2014-01-292-5/+20
|
* Implements refined printing of ViewProtoMartin Odersky2014-01-291-0/+3
|
* Fixing equality for selection protosMartin Odersky2014-01-292-7/+12
| | | | | | They no longer can be accidentally equal to refinement type. Todo: Disentangle selection protos entirely from Refinement types? See branch disentangle-selectproto.
* Better tracking of implicit searchMartin Odersky2014-01-292-4/+14
| | | | We now track eligible calls and the number of refs tested in an eligible call.
* Selective caching of SelectionProtos and ViewProtosMartin Odersky2014-01-276-74/+112
| | | | | | 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.
* Cache result of narrow on Methods.Martin Odersky2014-01-272-2/+16
| | | | 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.
* Accept method types directly in isApplicable.Martin Odersky2014-01-274-18/+24
| | | | This lets us streamline normalize, and avoid to create FunctionTypes if the expected type is a FunProto or ViewProto.
* Instrumentation on total isSubType calls.Martin Odersky2014-01-261-4/+9
|
* New treatment of uniquesMartin Odersky2014-01-2610-145/+300
| | | | | | | | 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.
* Refactored RefinedTypes to favor the case where refinedInfo is independent ↵Martin Odersky2014-01-262-8/+17
| | | | of type itself.
* Better caching of typesMartin Odersky2014-01-262-20/+31
| | | | | | | | | | | 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.
* Special casing of numeric widenings in viewExistsMartin Odersky2014-01-261-2/+13
| | | | | | 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.
* Some more statistic samplingMartin Odersky2014-01-268-32/+68
|
* Update to 2.11Martin Odersky2014-01-262-11/+4
| | | | Previous flagsString is no longer accessible. Have to use Dotty's mechanism to show flags,
* Statistics now also computes call counts of tracked operations.Martin Odersky2014-01-261-5/+23
|
* Add text markers around "hot" tracing operations.Martin Odersky2014-01-264-7/+7
| | | | That way they can be easily removed by search and replace, which gives us a clearer picture of the runtime profiles.
* Breaking out gc() method in TyperState.Martin Odersky2014-01-262-9/+30
| | | | Will need to call from type comparer if instantiations were delayed
* Fixes to constraint handling.Martin Odersky2014-01-269-1462/+309
| | | | | | | | 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.
* Fixing two bugs in subtype checking that cancelled each other out.Martin Odersky2014-01-262-9/+8
| | | | | | | 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.
* Try to dealias LHS in <:< where possible.Martin Odersky2014-01-261-4/+4
|
* Break out suboperations in separate methods...Martin Odersky2014-01-261-66/+90
| | | | ... 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.
* Move GADT tests earlier in subtype algorithmsMartin Odersky2014-01-261-15/+17
| | | | This is to avoid to instantiate a GADT with a an approximated bound. We need to treat GADTs the same way as PolyParams.
* Prune useless subtyping tests.Martin Odersky2014-01-261-11/+33
| | | | To make this work we moved the basetype test to thirdTryNamed where the lhs does not need to be a named type.
* Split TermRefs with underlying OrTypes.Martin Odersky2014-01-261-6/+20
| | | | | | | | 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.
* wip on typecomparersMartin Odersky2014-01-263-38/+317
|
* Refactoctored widening operations.Martin Odersky2014-01-261-8/+7
|
* Merge pull request #6 from VladUreche/topic/buildVlad Ureche2014-01-248-13/+118
|\ | | | | Build infrastructure
| * More nitpickingVlad Ureche2014-01-232-5/+12
| |
| * NitpickingVlad Ureche2014-01-231-10/+10
| |
| * Update readme with instructions for EclipseVlad Ureche2014-01-231-0/+6
| |
| * Fix (run, Test) classpath issuesVlad Ureche2014-01-231-4/+18
| |
| * Build infrastructureVlad Ureche2014-01-237-13/+91
|/
* Make better use of AndOrTypes.Martin Odersky2014-01-204-40/+1458
|
* For a typeRef, prefer info.isAlias over symbol.isAliasTypeMartin Odersky2014-01-207-17/+17
| | | | 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.
* Avoid eager forcing in enterArgBindingMartin Odersky2014-01-204-7/+19
| | | | Caused a cyclic reference error when compiling the three files in test "testNonCyclic".
* Drop AnyRef parent generation in DeSugar.Martin Odersky2014-01-191-4/+1
| | | | As of previous commit, Namer will take care of it.
* Normalize parent types so that first one always refers to a class, not a trait.Martin Odersky2014-01-195-27/+97
| | | | 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.
* Fix to lub: recompute if either operand can be widenedMartin Odersky2014-01-191-1/+1
|
* Adapt fun prototype when looking for second chance implicits (aka BigInt)Martin Odersky2014-01-193-3/+7
| | | | | | | | | | 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! ---
* Dropping isFullyRefined requirement when adapting to SAM type.Martin Odersky2014-01-191-1/+5
|