| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
Arguments to this(...) calls need a special contet,
similar to - but different from - the supercall context.
|
|
|
|
|
|
|
|
| |
Super calls need to have special contexts, going beyond super-mode.
It's explained in detail in Context#superCallContext.
this(...) calls also need special contexts, but this is not enabled yet
(some tests fail, need to track down why).
|
|
|
|
|
| |
Used to print <none> for denotations with a symbol,
now prints "some I" where I is the denotation's info.Reworked phases.
|
|\
| |
| | |
Error reporting improvements
|
| |
| |
| |
| | |
decouple Diagnostic from ContextBase
|
|\ \
| | |
| | | |
Documentation and a bit of cleanup.
|
| |/
| |
| |
| |
| |
| | |
Added documentation for non-trivial logic in Contexts, Phases and
TreeTransforms.
Removed redundant vars and casts
|
|/
|
|
|
|
|
| |
Replace member references for:
methods inside Any( == and !=)
## on primitives
.getClass on primitives
|
|
|
|
|
|
|
| |
withPhase operations in contexts are now memoized.
Conflicts:
src/dotty/tools/dotc/core/Contexts.scala
|
|
|
|
|
|
| |
clear is wrong. E.g. clearTyperState does not clear the typerstate at all. It installs a
fresh (i.e. cloned) copy of the previous one. clearScope is also wrong; it installs a new
scope, does not clear the current one.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The transformation framework needed to be changed so that contexts passed to
transformations have correct owner chains. These owner chins are demanded by
the Splitter phase.
Note: I eliminated the contexts array in TransformInfo because it interfered
with the owner computations. Generally, caching contexts with some phase is best
done in Contexts, because withPhase is also used heavily in othre code, not just in
Transformers.
New phase: Splitter
When it is complete, it will make sure that every term Ident and Select node
carries a symbol. Right now, all it does is coverting self reference idents to
"this"-nodes.
|
| |
|
|
|
|
| |
And avoid name clashes
|
|
|
|
|
|
| |
Previous version was wrong because every context is a fresh context at runtime,
so the overriding version would always be executed, which means that withPhase
becomes a side-effecting operation!
|
|\
| |
| |
| | |
Fix phase of context for denotation transformer
|
|/
|
|
| |
The phase is now always the phase on which the denotation transformer is defined.
|
|
|
|
| |
Eliminated all "Dotty deviations" which were due to lack of auto-tupling.
|
|
|
|
|
|
| |
All MiniPhases now as are full-fledged phases,
and are given their own periods and can register DenotTransformers.
MiniPhases belonging to same group(list) will be squashed to single phase.
|
|
|
|
|
|
|
|
| |
Many small and large changes. Added samplePhase to demonstrate functionality.
To test functioning, run the compiler with args
tests/pos/uncurry.scala -Ylog:sample,terminal
|
|
|
|
| |
To bring in line with TreeTransformer terminology.
|
|
|
|
|
| |
TypeAssigners assign a toplevel type to a node. They are mixed into Typer, and can be accessed from tpd using
ctx.typeAssigner.
|
|
|
|
|
| |
More verbose assertions.
Unnecessary semicolons removed.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Uniques are now cleared after each run. Also, HashSets get a more standard API, without a label, but with configurable load factor.
|
|
|
|
| |
Reason: (1) There are few sets: When compiling doty itself, 1.2K sets total, hashed to 500 uniques. (2) Bitset comparison is expensive because it relies on a double inclusion test. (This should be fixed in the Scala stdlib).
|
| |
|
|
|
|
|
|
| |
Instead current ctx is passed through everywhere.
Question: can we factor out ctx better?
|
| |
|
|
|
|
|
|
| |
Now this is required only for members of a template. Local statements can still have implicits with no result type. (Maybe we need to get back on this).
Also, changed Dotty itself and tests to adhere to the new restriction.
|
|
|
|
|
|
|
|
|
|
|
|
| |
some nested import.
This also changes the criterion when a root import is disabled.
A root import is now disabled if there is an inner import from the same package or module, and the inner import contains at least one disabling clause X => _. (The latter crierion is new; without it, we would consider something like
import scala.{collections => c}
as a hiding import for Scala, which seems to go too far.)
|
| |
|
| |
|
|
|
|
|
|
| |
We cache SelectionProtos if their "compat" parameter is "NoViewsAllowed". We always cache ViewProtos.
That's important for implicit search, because this enables eligible refs to be better cached. To make this work, we add a case to WildApprox which massages SelectionProtos so they also get noViewsAllowed in the compat parameter.
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
| |
Now handled: ConstantTypes, MethodParam, PolyParam
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
1) Made consistency checking water tight, so that inconsistencies are always catched wehn they arise
2) Fixed problem in implicit search that led to inconsistencies
3) Refined printing of type parameters and type arguments
|
| |
|
|
|
|
|
| |
Changed ThrowingReporter to use an underlying reporter for issuing messages below ERROR.
Made ThrowingReporters the default in initialContext.
|
| |
|
|
|
|
| |
Plus a few bugfixes for implicits
|
|
|
|
|
| |
1) Fixes for <:<
2) Changes in context handling type comparers that allow one to make a new type comparer that "sticks" in nested contexts.
|
|
|
|
| |
Plus a new test file: implicits1
|
|
|
|
| |
… which caused impicit context infos to be always empty
|
| |
|