aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Contexts.scala
Commit message (Collapse)AuthorAgeFilesLines
* Special context for self constructor argsMartin Odersky2014-08-241-8/+5
| | | | | Arguments to this(...) calls need a special contet, similar to - but different from - the supercall context.
* Fix context for super callsMartin Odersky2014-08-241-0/+50
| | | | | | | | 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).
* Better printing of denotations.Martin Odersky2014-04-081-2/+1
| | | | | Used to print <none> for denotations with a symbol, now prints "some I" where I is the denotation's info.Reworked phases.
* Merge pull request #99 from samuelgruetter/infostring2odersky2014-04-041-3/+0
|\ | | | | Error reporting improvements
| * remove var ContextBase.suppressNonSensicalErrors, andSamuel Gruetter2014-04-021-3/+0
| | | | | | | | decouple Diagnostic from ContextBase
* | Merge pull request #105 from DarkDimius/docsDmitry Petrashko2014-04-021-0/+5
|\ \ | | | | | | Documentation and a bit of cleanup.
| * | Documentation and a bit of cleanup.Dmitry Petrashko2014-04-011-0/+5
| |/ | | | | | | | | | | Added documentation for non-trivial logic in Contexts, Phases and TreeTransforms. Removed redundant vars and casts
* / Intercepted methods transformerDmitry Petrashko2014-04-021-1/+3
|/ | | | | | | Replace member references for: methods inside Any( == and !=) ## on primitives .getClass on primitives
* Memoizing Context#withPhaseDmitry Petrashko2014-03-311-18/+33
| | | | | | | withPhase operations in contexts are now memoized. Conflicts: src/dotty/tools/dotc/core/Contexts.scala
* Renaming clear->setNewMartin Odersky2014-03-311-2/+2
| | | | | | 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.
* Maintaining owners during transformationsMartin Odersky2014-03-311-0/+3
| | | | | | | | | | | | | | | | | 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.
* Fix #95: Phases now have their own periods.Dmitry Petrashko2014-03-271-4/+8
|
* Rename methods on FreshContext to make mutation obviousDmitry Petrashko2014-03-271-32/+32
| | | | And avoid name clashes
* Fix context.withPhaseMartin Odersky2014-03-271-5/+5
| | | | | | 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!
* Merge pull request #89 from dotty-staging/fix/transform-contextsDmitry Petrashko2014-03-241-2/+7
|\ | | | | | | Fix phase of context for denotation transformer
| * Fix phase of context for denotation transformerMartin Odersky2014-03-241-2/+6
|/ | | | The phase is now always the phase on which the denotation transformer is defined.
* Removed explicit tuplings from dotc codebase.Martin Odersky2014-03-201-1/+1
| | | | Eliminated all "Dotty deviations" which were due to lack of auto-tupling.
* Allow MiniPhase to be DenotTransformerDmitry Petrashko2014-03-191-3/+8
| | | | | | 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.
* Refactored denotation transformersMartin Odersky2014-03-181-1/+4
| | | | | | | | 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
* Renaming core.Transformer(s) -> core.DenotTransformer(s)Martin Odersky2014-03-181-1/+1
| | | | To bring in line with TreeTransformer terminology.
* Scond step to typer reorg: Introduce TypeAssigners.Martin Odersky2014-03-071-5/+8
| | | | | TypeAssigners assign a toplevel type to a node. They are mixed into Typer, and can be accessed from tpd using ctx.typeAssigner.
* Typos corrected.Dmitry Petrashko2014-03-031-1/+1
| | | | | More verbose assertions. Unnecessary semicolons removed.
* Reord of superIdsMartin Odersky2014-02-251-3/+3
| | | | | | | 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.
* Avoid memory leaks on repeated compilation.Martin Odersky2014-02-241-0/+3
| | | | | | | | | | | | | | | | | 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.
* Resetting uniques and hashset reorg.Martin Odersky2014-02-241-4/+11
| | | | Uniques are now cleared after each run. Also, HashSets get a more standard API, without a label, but with configurable load factor.
* Drop unique hashing for superId bitsetsMartin Odersky2014-02-211-7/+0
| | | | 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).
* Make Definitions load all symbols in current runId.Martin Odersky2014-02-101-1/+1
|
* Symbol loaders no longer complete with creation contextMartin Odersky2014-02-091-3/+3
| | | | | | Instead current ctx is passed through everywhere. Question: can we factor out ctx better?
* Move maxConstraint computation to RunInfo to avoid references to stale symbols.Martin Odersky2014-02-091-1/+1
|
* Relaxing check that implicits must have explicit return typeMartin Odersky2014-02-021-2/+2
| | | | | | 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.
* Avoid accessing implicits that come from root imports that are hidden by ↵Martin Odersky2014-02-021-4/+7
| | | | | | | | | | | | 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.)
* wip for implicits handling root imports.Martin Odersky2014-02-021-3/+5
|
* Replacing most occurrences of HashMap with AnyRefMapMartin Odersky2014-01-301-1/+1
|
* Selective caching of SelectionProtos and ViewProtosMartin Odersky2014-01-271-1/+1
| | | | | | 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.
* New treatment of uniquesMartin Odersky2014-01-261-2/+16
| | | | | | | | 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.
* Some more statistic samplingMartin Odersky2014-01-261-0/+2
|
* Augment namedParts to follow through on some proxy types.Martin Odersky2014-01-091-5/+3
| | | | Now handled: ConstantTypes, MethodParam, PolyParam
* Fixing illegal code that should have been flagged by scalac.Martin Odersky2014-01-071-3/+5
|
* Ensuring that contexts do not have NoSymbol as owner.Martin Odersky2014-01-021-1/+5
|
* Added divergence check for implicit searchesMartin Odersky2013-11-301-0/+7
|
* Changes to adaptation and local type inference.Martin Odersky2013-10-151-2/+2
|
* Tightening up typer state + printing refinementsMartin Odersky2013-10-121-1/+2
| | | | | | 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
* Fixed problem with withMode leaking into enclosing context.Martin Odersky2013-10-041-7/+7
|
* Changed Throwing reporting scheme.Martin Odersky2013-09-231-1/+1
| | | | | Changed ThrowingReporter to use an underlying reporter for issuing messages below ERROR. Made ThrowingReporters the default in initialContext.
* Experimental branch that drops {Term/Type}RefWithSym typesMartin Odersky2013-09-181-1/+1
|
* Improvements in implicits error reportingMartin Odersky2013-09-061-5/+7
| | | | Plus a few bugfixes for implicits
* Changes in typecomparersMartin Odersky2013-09-051-2/+5
| | | | | 1) Fixes for <:< 2) Changes in context handling type comparers that allow one to make a new type comparer that "sticks" in nested contexts.
* Fixes in implicit handlingMartin Odersky2013-08-231-2/+2
| | | | Plus a new test file: implicits1
* Fixing a buf in implicit searchMartin Odersky2013-08-221-2/+1
| | | | … which caused impicit context infos to be always empty
* Fixes to import handling and adaptation and implicitsMartin Odersky2013-08-211-2/+0
|