aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Scopes.scala
Commit message (Collapse)AuthorAgeFilesLines
* Get more info on HeisenbugsMartin Odersky2015-11-091-0/+14
| | | | | | 1) Check that searched scope is consistent 2) Do a linear search for symbol with name, and report if something was found that way.
* Remove trailing spaces in Dotty source.Dmitry Petrashko2015-04-091-4/+4
|
* New method on scopes: openForMutationsMartin Odersky2014-12-181-3/+7
| | | | Replaces `asInstanceOf[MutableScope]` calls.
* Scopes: make sure every bucket of the hash table is usedGuillaume Martres2014-11-111-2/+4
| | | | | Previously, one bucket was never used because in binary, 12*2^n - 1 = 101111...
* Make cloneScope less forcefull.Martin Odersky2014-11-091-6/+25
| | | | | Motivation: Avoid needless forcing of symbols in scope. This is a problem when cloneScope is called in TreeTransforms.
* More assertions in TreeChecker.Martin Odersky2014-10-261-0/+1
| | | | Flushed out a caching bug in Scopes.
* Drop type declarations from erased ClassInfoMartin Odersky2014-10-111-1/+18
| | | | Need to drop all non-class type declarations.
* Better TreeTypeMapsMartin Odersky2014-09-131-1/+15
| | | | | | | | | | | | | | | | 1. They now keep track of changed constructors in templates, updating the class scope as for other members. 2. Any changed members are now entered into the new class scope at exactly the same position as the old one. That ensures that things like caseAccessors still work. 3. ChangeOwners now is reflected in the prefixes of any named types. 4. Newly created classes now get their own ClassInfo type. 5. TreeTypeMaps always crete "fresh" symbols. Fresh symbols do not share a NamedType reference with an existing reference to some other symbol. This obviates b2e0e7b4, which will be reverted. To make it work, the interface of TreeMap changed from an ownerMap function to a substitution-like data structure working with two lists.
* Make type creators work for erased types.Martin Odersky2014-08-241-1/+1
| | | | | | | | - Some types are different when erased (e.g. prefixes are NoPrefix) - Some types are forbidden when erased. Put in assertions to check that fact. Also, some renaming and doc comments to make creation of TermRefs and TypeRefs clearer.
* Narrow assertion for Scope#enterMartin Odersky2014-08-101-2/+2
| | | | | | Scopes are also used in overriding pairs, and there multiple types with the same name can be entered in a scope. So the assert to the contrary should be limited to typechecking only.
* Add cloneScope method and handle versioning of ClassInfo#declsMartin Odersky2014-07-171-4/+5
| | | | | This is done to streamline changing class denotations in new phases by adding to (or otherwise modifying) their decls scope.
* Typos corrected.Dmitry Petrashko2014-03-031-2/+2
| | | | | More verbose assertions. Unnecessary semicolons removed.
* 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.
* Removing conforms from StdNames because it shadows Predef.conforms, which is ↵Martin Odersky2014-01-101-4/+4
| | | | | | needed a lot for implicit search. We need to use a less common name for Predef.conforms!
* Some cleanups.Martin Odersky2014-01-021-1/+2
|
* Fixing problems in treatment of private symbolsMartin Odersky2013-12-241-2/+8
| | | | | | | | | | | | 1) Accessibility check was broken because it looked at symbol's owner, where it should have looked at context owner. 2) Refined treatement if members. Previously, nonPrivate member returned a subset of member, i.e. those denotations returned by member that were not private. This is not correct. In a situation like class A { def x: Int = 1 } class B { private def x: String = "" } extends A (new B).x the non-private member returned should be A#x. Changed membersNamed and friends as well as checkAccessible to account for that.
* Fixed several deep problems in handling of types and symbols.Martin Odersky2013-12-141-1/+1
| | | | | | | | | 1. We forgot to mark declaration symbols Deferred. 2. Types with NoPrefix and the same name got identified. Fixed by adding a new category WithNoPrefix to named types, and changing the way named types get generated. 3. Self types lacked parameters. (Question: Do we need to also track type members?) 4. Printers caused cyclic reference errors. Now some print operations are more careful with forcing. 5. Namedparts accumulator has to be more careful with ThisTypes. Because self types now contain parameters, which might lead back to this, we only add the class name (or the source module, if it's a module class). 6. toBounds in TypeApplications needs to use Co/Contra aliases for expanded name parameters, not just local ones.
* Changed handling of signatures in TermRefs.Martin Odersky2013-11-011-2/+4
| | | | | | | | Previously, plain TermRefs had signature NotAMethod. The problem is if the TermRef represents an overloaded term and one of the alternatives is NotAMethod. Then creating the alternative will overwrite (via hash-consing) the overloaded ref. Solution: Introduc new pseudo-signature "UnknownSignature" which is given to plain TermRefs. Also, need to be careful now that all members that denote a specific alternative of a possibly overloaded denotation are referenced by a TermRefWithSig, not a plain TermRef. Previously, implicit members did not follow that, which meant that, what worked, worked only by accident. Still to do: Clean up signatures, termref creation methods. Should TermRef.withDenot automatically set the signature?
* Experimental branch that drops {Term/Type}RefWithSym typesMartin Odersky2013-09-181-4/+4
|
* Improvements in implicits error reportingMartin Odersky2013-09-061-6/+7
| | | | Plus a few bugfixes for implicits
* Fixing validity checking of denotations.Martin Odersky2013-08-131-8/+8
| | | | To get this to work, we need to store the name of a scope netry irectly in the entry. This is arguably the right model anyway. A symbol can have different denotations with different names, and it might exist under different names in different scopes. In the previous model once a symbol's name changed in some phase, all scopes referring to that symbol from previous phases would become invalid. Now, the symbol is still visible under its original name.
* Additions needed to support implicits.Martin Odersky2013-07-191-0/+15
| | | | | | Still to do: - properly account for bounded wildcard types - set up scheme for nested diagnostics buffers.
* Refactored Printing architecture.Martin Odersky2013-05-171-1/+2
| | | | | Split printers into several files. Added refined printing of trees. Changed Showable and generalized printing under a precedence.
* Refactored Printers, Showable and Text into new package dotc.printing.Martin Odersky2013-05-141-2/+2
|
* Added filter utility method to Scope…Martin Odersky2013-04-071-5/+9
| | | | … which is more efficient than toList.filter.
* More fixes for classfile reading.Martin Odersky2013-03-251-1/+2
| | | | In particular: Survive malformed type errors. Make trees cloneable. and others more.
* Fixes fingerprint problems.Martin Odersky2013-03-241-3/+0
| | | | 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-1/+1
|
* More fixes to classfile reading.Martin Odersky2013-03-231-1/+3
| | | | Most important one: Getting equality of NamedTypes right.
* More fixes for classfile reading.Martin Odersky2013-03-221-1/+1
| | | | Including a refactoring of symbol loaders and unpickler traits.
* Pretty-printing improvements.Martin Odersky2013-03-201-1/+2
|
* Fixing problem with reading typeParams correctly in UnpicklerMartin Odersky2013-03-191-0/+1
|
* First steps to make compiler start work.Martin Odersky2013-03-111-12/+9
| | | | Still fighting with CyclicReference errors.
* Some refinements for priningMartin Odersky2013-03-071-3/+3
| | | | Made trees printable in plain mode (refined mode still missing).
* Polishing of scopes.Martin Odersky2013-03-061-9/+9
|
* Split scopes into immutable and mutable parts.Martin Odersky2013-03-031-69/+99
| | | | 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.
* Renamed DenotationSet -> PreDenotationMartin Odersky2013-02-271-2/+2
|
* Filling in all ???sMartin Odersky2013-02-271-1/+1
| | | | | | | Added reporters. Added context for signatures. Implemented method signatures via erasure. Refined derivedNameType handling.
* Add method to show a scope.Martin Odersky2013-02-151-2/+1
|
* Various additions to symbols, denotations, and elsewhereMartin Odersky2013-01-241-6/+1
|
* Big renaming to drop Reference(d) as a terminology and use Denotation ↵Martin Odersky2013-01-211-5/+6
| | | | instead. previous Denotations (which already were a subclass) are renamed to SymDenotations.
* Renamed "Reference" to "Referenced".Martin Odersky2013-01-171-3/+3
|
* Completed period-tracking in named types. Made Denotation a subtype of ↵Martin Odersky2013-01-171-1/+1
| | | | symblic referenced and generalized denotation versioning to referenced versioning.
* Implemented baseClasses and baseTypes (2). Refactored RefinedType and ↵Martin Odersky2012-12-161-0/+12
| | | | ClassInfoType.
* Initial commitMartin Odersky2012-12-061-0/+299