| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
1) Check that searched scope is consistent
2) Do a linear search for symbol with name, and report
if something was found that way.
|
| |
|
|
|
|
| |
Replaces `asInstanceOf[MutableScope]` calls.
|
|
|
|
|
| |
Previously, one bucket was never used because in binary,
12*2^n - 1 = 101111...
|
|
|
|
|
| |
Motivation: Avoid needless forcing of symbols in scope. This is a problem when
cloneScope is called in TreeTransforms.
|
|
|
|
| |
Flushed out a caching bug in Scopes.
|
|
|
|
| |
Need to drop all non-class type declarations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
- 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.
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
This is done to streamline changing class denotations in new phases
by adding to (or otherwise modifying) their decls scope.
|
|
|
|
|
| |
More verbose assertions.
Unnecessary semicolons removed.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
needed a lot for implicit search.
We need to use a less common name for Predef.conforms!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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?
|
| |
|
|
|
|
| |
Plus a few bugfixes for implicits
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Still to do:
- properly account for bounded wildcard types
- set up scheme for nested diagnostics buffers.
|
|
|
|
|
| |
Split printers into several files. Added refined printing of trees. Changed Showable and generalized printing
under a precedence.
|
| |
|
|
|
|
| |
… which is more efficient than toList.filter.
|
|
|
|
| |
In particular: Survive malformed type errors. Make trees cloneable. and others more.
|
|
|
|
| |
Also reducing debug output. Can now read and display all classes and objects in scala.collection.
|
| |
|
|
|
|
| |
Most important one: Getting equality of NamedTypes right.
|
|
|
|
| |
Including a refactoring of symbol loaders and unpickler traits.
|
| |
|
| |
|
|
|
|
| |
Still fighting with CyclicReference errors.
|
|
|
|
| |
Made trees printable in plain mode (refined mode still missing).
|
| |
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
| |
Added reporters.
Added context for signatures.
Implemented method signatures via erasure.
Refined derivedNameType handling.
|
| |
|
| |
|
|
|
|
| |
instead. previous Denotations (which already were a subclass) are renamed to SymDenotations.
|
| |
|
|
|
|
| |
symblic referenced and generalized denotation versioning to referenced versioning.
|
|
|
|
| |
ClassInfoType.
|
|
|