| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Goes into a separate source files. Several simplifying refactorings.
|
|
|
|
|
|
|
|
|
| |
(1) Template nodes have to be treated specially. They contain
primary constructors, self definitions and local dummys,
all of which have to be properly mapped and re-integrated.
(2) Symbol substitutions have ot be done all together instead of
one after the other.
(3) When creating new symbols, need to create ClassSymbols for ClassSymbols.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Packages should always have a single denotation, which is invariant for all transformations.
Package members should always be entered in the first phase, and should never be entered
after a given phase.
This reflects the fact that package members correspond to classfiles. Once you create a classfile, it
stays around and is available from the start of the next run. Also, we need to prevent multiple
denotation versions of packages from hanging on to stale symbols. It would not be enough to replace
a package member by a newly compiled one; if packages had multiple denotations we'd have to do this
for all of them.
|
|
|
|
| |
Problem was reported by @darkdimius. Test case will come in next commit.
|
|
|
|
|
|
| |
Type params should have different flags, depending on whether they are
owned by a method or a class. Only class type parameters are marked Deferred,
protected, and Local.
|
| |
|
|
|
|
|
|
|
| |
- Some new functionality in tpd and in Symbols.
- Added `sm` interpolator to print nicely.
- Make use of nestedMap where possible.
- Add IdentityDenotTransformer as a convencience class
|
|
|
|
|
| |
Rewrote SuperAccessors (more to be done; see comments), and
added stuff here and there to make it work smoother.
|
|
|
|
|
|
|
|
| |
This shouldn't require any changes to backend,
as all type parameters will be erased in erasure
Conflicts:
src/dotty/tools/dotc/core/Symbols.scala
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The main problem with TermRef handling was that signatures were not always tracked correctly.
New invariant: A TermRef that points to a symbol is always a TermRefWithSig, and the signature
is the one of the corresponding member.
We achieve this by sometimes generating a new TermRefWithSig if a TermRef gets a denotation.
One possible simplification would be to always store a signature in a TermRef.
There's still a problem in TermRefWithSig#newLikeThis, which currently works only if the previously stored
denotation references a symbol. We will need to generalize JointRefDenotation to contain multiple symbols for
a complete fix.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Now works for all combinations of
java/scala
sue ErasedValueClass/go directly to underlying type
constructors/others
wildcards ok/not
Signatures had to be refined as well, because the signature depends
on whether a type comes form Java or Scala (handling of intersections
is different).
Also, replaced splitArray method in TypeApplication by extractors for
single- and multi-dimensional array types in definitions.
|
|
|
|
| |
To bring in line with TreeTransformer terminology.
|
|
|
|
|
|
|
| |
This makes naming uniform between trees and types, and also avoids the clash with
transform.TreeTransformer. The idea is that transformers are parts of phases, and
have logic that is phase-specific. In particular, a context is passed around when
transforming a tree. Maps are simpler, they only have a T -> T apply method.
|
|
|
|
|
| |
Needs new TypeRef creation method that works for NoPrefix and at the same time
does not need a denotation. This is provided by method TermRef.withNakedSymbol.
|
| |
|
| |
|
|
|
|
|
|
|
| |
1) We now keep an association between ClassSymbol and SuperId (instead of TypeRef and SuperId). That's better
because superId's are deleted anyway after each run, so we gain nothing by keeping a stable ref.
2) hasChildren got dropped. It was too unreliable. The mere fact that someone take's the superId of a class
does not means that that class has children.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Several measures:
1. Invalidate classOfId and superIdOfClass in ContextBase after each run. These contain local classes
that should become inaccessible.
2. Also clear implicitScope cache that maps types to their implicit scopes after each run. (not sure whether
this is needed; it did show up in paths from root, but on second thought this might have been a gc-able
cycle.
3. Avoid capturing contexts in lazy annotations.
4. Avoid capturing contexts in functions that compute souceModule and moduleClass
5. Avoid capturing contexts in Unpickler's postReadOp hook.
|
| |
|
|
|
|
|
|
|
| |
Added general way to put attachments on some base type (which needs to inherit from Attachment.Container).
Used it to turn typedTree map into an attachment.
Also, moved DotClass to dotc.util.
|
|
|
|
|
|
| |
Instead current ctx is passed through everywhere.
Question: can we factor out ctx better?
|
| |
|
| |
|
|
|
|
| |
... because there's no way to reload them in a new run.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Happened (albeit non-deterministally) when compiling parsing/*.scala
|
| |
|
|
|
|
| |
... as all other show methods do.
|
|
|
|
| |
All occurrences replaced by select, or second version of Term/TypeRef.apply
|
| |
|
|
|
|
| |
gave a NPE before.
|
|
|
|
| |
Module classes are entered alongisde their source modules in parent scope.
|
|
|
|
|
| |
Changed ThrowingReporter to use an underlying reporter for issuing messages below ERROR.
Made ThrowingReporters the default in initialContext.
|
| |
|
| |
|
|
|
|
| |
… more to come. Plus some bugfixes.
|
|
|
|
|
|
|
|
|
|
|
| |
1) Refactoring of package loaders that ensures that a package is always loaded before new members are entered. This led to a refactoring of sourceModule in completers into its own trait
2) Refactoring of optSelfType ot selfInfo. Class Infos may now have a reference to a symbol in their selfInfo field, instead of always a type, as it was before. This allows to introduce laziness for self type evaluation. Laziness is needed so that modules can be desugared and the desugared version be compiled without special tricks.
3) <init> and $init members are no longer inherited.
4) Refactoring of createSymbol and enterSym, so that creating symbols and entering them in a scope is decoupled.
Renamed the driver operation form `enterSym(s)` to `index`.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Added Applications class to represent applications
- Added Constraint class to represent type constraints
- Added TyperState class to represent typer state
- Added Diagnostic class to buffer errors and warnings
- Added Inferencing class that contains some common functionality for type inferencing (this one's still rudimentary).
- Added extractor for FunctionType in Definitions
- Added desugaring of default parameters to default getters in Desugar
- Added flags to deal with default parameters
- Added substitutions that replace bound parameters
|
| |
|
| |
|
|
|
|
| |
A new design that relies on DefDef local maps, instead of global maps before.
|
| |
|
|
|
|
| |
Moved all other elements of TypedTrees and UntypedTrees into tpd and untpd.
|
|
|
|
|
|
|
| |
1) Getting rid of ugen in favor of untpd.
2) Eliminating some unused methods
3) Splitting out CheckTrees from TypedTrees.
4) Moving trees and related classes into separate package dotc.ast
|
|
|
|
|
| |
Split printers into several files. Added refined printing of trees. Changed Showable and generalized printing
under a precedence.
|