aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Tweaks to InferencingMartin Odersky2013-11-294-132/+178
| | | | Also: Making VarianceMap a SimpleMap for replayability
* File name renamingMartin Odersky2013-11-283-4/+1
| | | | Bringing file names tpd/untpd in line with the objects they define.
* Using SimpleMap instead of Map for replayability.Martin Odersky2013-11-281-13/+12
|
* Making substitutions deep type maps that also map parents and self type of a ↵Martin Odersky2013-11-282-25/+28
| | | | class info.
* Refactorings in TypeComparers and elsewhereMartin Odersky2013-11-283-106/+78
| | | | Broke out common functionality in two new methods: widenExpr, and commonVariance.
* Tightening (constraint contains param) conditionMartin Odersky2013-11-281-1/+1
|
* Making maps configurable so that they can also go inside parents and self ↵Martin Odersky2013-11-281-1/+16
| | | | types of ClassInfos.
* Hoisting out commonly used values into util.commonMartin Odersky2013-11-286-43/+62
| | | | ... because this cuts down on object creations. Also, some polishings in Denotations.
* Optimizing signaturesMartin Odersky2013-11-273-30/+32
| | | | Interesting signatures are now cached.
* Changed SignaturesMartin Odersky2013-11-279-79/+116
| | | | Signatures have a different meaning before and after erasure. After erasure, the result type counts also whereas before it doesn't. The new definitions refelect this behavior.
* More posishings of SymDenots/Denotations.Martin Odersky2013-11-265-49/+47
| | | | | | | In particular - closed a loophole where we did not go through parentDenot in ClassDenotation. - fused some of the predenotation ops used in computeMemberNames
* Dropping the Expanded when computing type parameter variances.Martin Odersky2013-11-254-22/+11
| | | | Did not look like it was needed, after all; Local alone is enough.
* Tweaks to SymDenotationsMartin Odersky2013-11-251-37/+48
|
* Final set of Types tweaksMartin Odersky2013-11-253-17/+14
| | | | - make namedParts return an ordered collection.
* More Types polishingsMartin Odersky2013-11-252-121/+137
| | | | In paricular, now type accumulators include the prefix of a ClassInfo type.
* Cleanup of TermRef.withSym and TypeRef.withSymMartin Odersky2013-11-2511-31/+27
| | | | All occurrences replaced by select, or second version of Term/TypeRef.apply
* Getting rid of UnknownSignatureMartin Odersky2013-11-252-29/+21
| | | | I believe the logic is now clearer. Good to have one magic value less.
* More Types polishingMartin Odersky2013-11-252-58/+31
|
* Types refactoringsMartin Odersky2013-11-257-388/+414
| | | | | | - moving out type applicaton related operations to a decorator: TypeApplications - converting some set operations to list operations to make them replayable. - moving unused operations to Types.overflow
* Cleanup of named type creation from SymDenotations.Martin Odersky2013-11-2313-57/+58
| | | | | | | | | New operations: - typeRef - termRef - valRef (like termRef, but with NotAMethod signature) - termRefWithSig (like termRef, but with denotation's signature)
* Renaming: typeConstructor -> typeRefMartin Odersky2013-11-2218-96/+96
|
* More tweaks to TypesMartin Odersky2013-11-221-74/+74
|
* Tweaks to SimpleMapMartin Odersky2013-11-221-62/+94
| | | | Now uses a custom representation for sizes 4 and over. This improves on the previous representation in terms of immutable.Map because it is more efficient for smaller sizes and keeps orderedness. Being ordered is important for making things replayable.
* Dropping cinsistency checking logic from typerstates.Martin Odersky2013-11-224-79/+32
| | | | Because of the new typerstate design, we can enforce most invariants by design, or in a purely local manner. We can therefore drop the checkConsistent checks and replace them with much more lightweight assertions that make sure that only committable states are committed and only committable states can create typevars.
* Consolidation of TyperState and ConstraintMartin Odersky2013-11-216-106/+148
| | | | Removing undetVars and instTypes as separately assignable fields. This is better for maintaining invariants by design.
* Better encapsulation for constraints.Martin Odersky2013-11-203-40/+44
| | | | The fact that constraints are maps from PolyTypes to Array[Type] is now hidden form the restr of the program (Or, almost; unfortunately value classes force us to expose the parameter, but we renamed it to a name which is typically used for private data).
* Splitting constraint.appky into at, bounds, contains.Martin Odersky2013-11-204-11/+16
| | | | Motivation: Keep usages separate, prepare for larger constraint refactoring.
* More tweaksMartin Odersky2013-11-204-6/+13
|
* Added unit testing supportMartin Odersky2013-11-183-13/+25
|
* Various cleanupsMartin Odersky2013-11-186-55/+44
|
* Changing some TermRef's to selectsMartin Odersky2013-11-161-4/+4
|
* Converting most uses of NamedType to select.Martin Odersky2013-11-158-39/+48
| | | | | Select reduces refinetype/typeref pairs and is therefore preferable over raw NamedType. Still need to do the same for TypeRefs.
* Formign lubs over widened types only.Martin Odersky2013-11-151-1/+6
| | | | To avoid noisy lubs such as Int(1) | Int(2) | Int(3), we impose the rule that A | B is valid only if A and B are non-singleton, widened types. This also maps Nil | Cons automatically to List, and maps None | Option automatically to Some.
* Tweaks to adaptation and interpolationMartin Odersky2013-11-156-17/+25
| | | | | | | 1. Needed to interpolate aftyer implicit parameyters are added. 2. Also needed to avoid constraining typevars if compared against selection proto. Original coder example now typechecks.
* Tweak to Coder testMartin Odersky2013-11-151-1/+1
|
* Made stripTypeVar idempotentMartin Odersky2013-11-151-4/+9
| | | | The unstated assumption everywhere was that stripTypeVar would get rid of TypeVars. But it didn't if we had a TypeVar isntantiated to a TypeVar. Now it follows through chains of TypeVars.
* making all internal errors throw exceptions (for now).Martin Odersky2013-11-142-2/+2
| | | | Better for now, since we do not want them do be hidden when testing / debugging the compiler.
* derivedNamedType -> derivedSelectMartin Odersky2013-11-143-12/+17
| | | | Performing refined/typeref reduction everywhere
* Providing for new match scheme.Martin Odersky2013-11-141-8/+9
| | | | See doc comment for Config.newMatch what this is about,
* Making as seenfrom reduce types.Martin Odersky2013-11-142-32/+22
| | | | Adding operattions select, derivedSelect which reduce combinations of typerefs over refinement types.
* Some configuation parametersMartin Odersky2013-11-147-31/+47
| | | | Caching, plus whether we want to match on signatures or types.
* replace qualifierType by widenIfUnstable.Martin Odersky2013-11-143-4/+7
| | | | Also, throw an exception on internal errors rather than issuing an error (this helps debugging, should be reverted for production).
* Changes to dealiasing and wideningMartin Odersky2013-11-141-36/+72
| | | | | | | | | | 1) Mappers and Accumulators now reduce typerefs over refinements but do not follow general type args Following type args in asSeenFrom leads into trouble because it specializes covariant aliases too early. A later as seen from might specialize the same alias with a more specific type. 2) The isDependent test in method type now uses a custom accumulator, because it needs to not flag erroenously types of the form p.T where p is a method paramater and T is a type parameter if `p`'s type which is aliased to an argument type. It should consider the argument type instead. With the change to 1), this broke, and is fixed by 2). 3) Unstable prefixes in member are widened.
* Debug measure: Report all errors when they are first issuedMartin Odersky2013-11-141-1/+3
|
* Make undetVars a set with deterministic traversal order.Martin Odersky2013-11-141-1/+1
| | | | Needed for replayability.
* widen if unstable prefixMartin Odersky2013-11-133-5/+16
|
* Fixing a problem in <:< of named types.Martin Odersky2013-11-131-15/+53
|
* Bringing underlyingIfRepeated up-to-dateMartin Odersky2013-11-113-3/+5
| | | | Was still using the old-alias scheme, which is ineffective now.
* Dealias before add to constraint.Martin Odersky2013-11-102-4/+16
| | | | We need to dealias any bounds before adding it to the constraint because otherwise we might have added a constraint X <: X in disguise.
* Reporting max constraintMartin Odersky2013-11-103-24/+28
| | | | Instead of throwing an exception if SImpleMap size goes over some threshold, we now report the largest constraint encountered in a run.