aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/TypeOps.scala
Commit message (Collapse)AuthorAgeFilesLines
* Reverted: Avoid using TypeBounds in alias refinements.Martin Odersky2014-02-211-2/+2
| | | | The idea is to use the alias itself. This cuts down on # of typebounds created and makes operations on refined infos and applied types more direct. (reverted from commit 81f31f9b71bc4466d3f04f5ce28ef94051688ecd)
* Avoid using TypeBounds in alias refinements.Martin Odersky2014-02-211-2/+2
| | | | The idea is to use the alias itself. This cuts down on # of typebounds created and makes operations on refined infos and applied types more direct.
* Two performance optimizationsMartin Odersky2014-02-131-4/+5
| | | | | 1) Split out wildApprox into separate function 2) Be more careful not to follow static prefix chains where not needed
* Some changes in the interest of speedups.Martin Odersky2014-02-121-0/+22
|
* Getting rid of some CompleInCreationContextsMartin Odersky2014-02-091-2/+2
|
* Making completer take an implicit contextMartin Odersky2014-02-091-2/+2
| | | | | | | As a first step, we make the complete method in LazyType take an implicit context parameter. This requires a fairly large propagation of implicit contexts. The implicit parameter is ignored for classes inheriting from CompleteInCreationContext (which until now are all completers). The next step will be to make the complete methods of selective lazy types take the current context, rather than the creation context.
* Add text markers around "hot" tracing operations.Martin Odersky2014-01-261-2/+2
| | | | That way they can be easily removed by search and replace, which gives us a clearer picture of the runtime profiles.
* For a typeRef, prefer info.isAlias over symbol.isAliasTypeMartin Odersky2014-01-201-1/+1
| | | | 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-201-1/+8
| | | | Caused a cyclic reference error when compiling the three files in test "testNonCyclic".
* Normalize parent types so that first one always refers to a class, not a trait.Martin Odersky2014-01-191-20/+34
| | | | 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.
* Normalize parents to be class refsMartin Odersky2013-12-221-3/+4
| | | | | | Previously, alias type refs were also accepted. But this is the wrong assumption for computeMembersNames. So, e.g. instead of leaving an AnyRef we now expand to Object. Also making ==, != take an Any instead of Object
* Fixes related to SAM types.Martin Odersky2013-12-151-3/+0
| | | | | | | 1. Changes to SAMType extractor 2. Self names are no longer members of enclosing class 3. SAM-Type closures now print with their result type. 4. refactoring newSkolemSingleon ==> narrow
* SimpleMap.foreachKey -> foreachBindingMartin Odersky2013-11-291-4/+4
|
* Using SimpleMap instead of Map for replayability.Martin Odersky2013-11-281-13/+12
|
* Cleanup of TermRef.withSym and TypeRef.withSymMartin Odersky2013-11-251-1/+1
| | | | All occurrences replaced by select, or second version of Term/TypeRef.apply
* Types refactoringsMartin Odersky2013-11-251-4/+8
| | | | | | - 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
* Renaming: typeConstructor -> typeRefMartin Odersky2013-11-221-1/+1
|
* Making as seenfrom reduce types.Martin Odersky2013-11-141-16/+6
| | | | Adding operattions select, derivedSelect which reduce combinations of typerefs over refinement types.
* Bringing underlyingIfRepeated up-to-dateMartin Odersky2013-11-111-1/+1
| | | | Was still using the old-alias scheme, which is ineffective now.
* Added shortcuiting for type argument aliases.Martin Odersky2013-10-101-4/+49
|
* Bug fixes and improvements in error diagnostics.Martin Odersky2013-09-161-108/+0
| | | | Main refactoring: lub/glb moves to type comparers.
* Better robustness in the presence of error types.Martin Odersky2013-08-151-0/+2
|
* Distribute & into TypeTypes.Martin Odersky2013-06-181-2/+28
| | | | &, | on two TypeTypes yielded AndTypes and OrTypes, which is wrong. We now turn any ClassInfoTypes into TypeBounds and distribute the operator into the bounds, creating a TypeBounds type.
* Some annotations and changes prompted by the code walkthrough.Martin Odersky2013-04-221-1/+10
|
* Re-organized comparisons of types with classes.Martin Odersky2013-04-101-1/+1
| | | | New methods: isClassType, derivesFrom, isArray. Refactored calls to typeSymbol and <:< into these. Made sure to use dealias where needed on remaining typeSymbol calls.
* Renamed creation methods of NamedTypesMartin Odersky2013-04-091-1/+1
| | | | | Methods taking a fixed symbol are now called …withSym, methods taking a signature … withSig. The reason for the change is that we want to liberate the original method names to take optional denotations, thus avoiding to have to go through withDenot each time.
* Made & , | NoType-aware.Martin Odersky2013-04-051-0/+4
| | | | For the pruposes of & and |, NoType is now treated as top type, above Any.
* Added some tracing to asSeenFrom.Martin Odersky2013-04-051-4/+5
|
* Consolidated tracing under -YdebugTrace.Martin Odersky2013-04-041-1/+3
|
* Trying to get at the root of cyclic reference problems.Martin Odersky2013-04-041-21/+21
| | | | Part 1: Enabling tracing and avoiding subtype computations in margeDenot.
* Improvements in tracing and some Type fixes.Martin Odersky2013-04-031-0/+2
|
* Fixes fingerprint problems.Martin Odersky2013-03-241-2/+2
| | | | Also reducing debug output. Can now read and display all classes and objects in scala.collection.
* Attempt to fix fingerprint problem (disabled for now)Martin Odersky2013-03-231-4/+6
|
* More fixes for classfile reading.Martin Odersky2013-03-221-0/+2
| | | | Including a refactoring of symbol loaders and unpickler traits.
* Added emulation of higher-kinded types.Martin Odersky2013-03-171-1/+3
| | | | Also improvements to toString.
* Various fixes to make classfile loading work.Martin Odersky2013-03-151-2/+2
| | | | Can now read and display info of verious classfiles as listed in the showClass test. Great end of the week!
* Checking abstractness of types by their flags.Martin Odersky2013-03-121-8/+3
| | | | Previously we looked at the info, but this forces too much. As a consequence we now systematically prefer concrete over abstract when computing & denotations. This could have the strange(?) effect that the symbol of a joint denotation is a class, yet its info is a TypeBounds value.
* Split filterAsSeenFrom and generalized flag handling.Martin Odersky2013-03-121-1/+1
| | | | | | | | 1. filterAsSeenFrom has been split again into its constituents "filterExcluded" and "asSeenFrom", and care was taken not to force the info unless we have to. The accessible check is no longer done when collecting members, because it would have forced the symbol through requesting privateWithin. 2. SymDenotation#is is tweaked to no longer force the denotation if the flags are in "FromStartFlags", i.e. set upon symbol creation. We can then eliminate special cases isModuleXXX, isPackageXXX. 3. Other tweaks mostly having to do with weakening sym.exists checks to avoid CyclicReference errros.
* Finished polishing of Types and TypeOps.Martin Odersky2013-03-061-10/+6
| | | | Manjor change is that splitArgs got eliminated and replaced by an optimized version of typeArgs.
* Streamlined implementation of asSeenFromMartin Odersky2013-03-061-15/+8
| | | | The new implementation keeps symbolic references where possible
* More polishing of types.Martin Odersky2013-03-051-17/+13
|
* Rewrite of isVolatileMartin Odersky2013-03-041-43/+29
| | | | Also, now all calls to NamedType#underlying are montored for infinite cycles.
* Renamed RefinedType#name, #info…Martin Odersky2013-03-041-5/+5
| | | | … to refinedName, refinedInfo. Also some other polishings in Types.
* Split scopes into immutable and mutable parts.Martin Odersky2013-03-031-1/+1
| | | | The goal is that symbols should be entered/deleted directly into classes instead of their scopes. This is necesaary so that invariant about fingerPrint can be maintained. We achieve it by making the info scope have immutable type, so an explicit cast is needed to get around that.
* Polishing of denotationsMartin Odersky2013-03-021-2/+5
| | | | | | | | 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.
* Refactoring and cleanup of several symbol creation related aspects.Martin Odersky2013-02-241-1/+1
| | | | | | | 1. Went back to old completer model where completers are types. 2. Made class denotations a simple optimzation of symbol denotatons (with more caches) by moving all class-specific attributes into ClassInfo. 3. Now all symbol and symbol denotation creations are routed through one of 3 methods: newNakedSymbol, newNakedClassSymbol, newSymDenotation.
* Misc fixes to typed trees, flags, and elsewhere.Martin Odersky2013-02-211-1/+1
|
* More utility methods and split up filterMartin Odersky2013-02-211-1/+1
| | | | More utility methods in types. Also replaced Denotation#filter with a set of more useful operations.
* Fleshed out TypeTreeGen.Martin Odersky2013-02-181-0/+6
| | | | All base cases now supported. Still missing: Intelligent treatment of positions.
* Added methods to convert between (virtual) type application and refinements.Martin Odersky2013-02-081-1/+31
| | | | Refactored parent normalization from Unpickler to TypeOps.