aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Phases.scala
Commit message (Collapse)AuthorAgeFilesLines
* Clean up config.Printers importsOlivier Blanvillain2016-09-231-1/+1
| | | | And remove the not used Printer#echo
* Explain isTyper field in Phase.Martin Odersky2016-04-081-1/+5
|
* Cache the Phases we need in JSCodeGen like all other phases.Sébastien Doeraene2016-03-161-0/+4
|
* Do not create companions that will be dropped later.Dmitry Petrashko2016-02-201-0/+5
| | | | | | | | Fix blocker bug reported in #1114 I dislike this fix as now phase needs to know in advance if it will ever need a companion for the class. On the bright side, this change makes it clear which phases need companions
* Utility method for phase replacementMartin Odersky2016-02-171-0/+7
| | | | | Allows to replace existing phase by sequence of new phases.
* Fix bug in phase identification for YcheckMartin Odersky2015-11-171-2/+2
| | | | | -Ycheck:era checked after phase resolveSuper. This was due to an overly simplistic containsPhase check.
* Merge pull request #758 from ↵Dmitry Petrashko2015-08-201-10/+8
|\ | | | | | | | | dotty-staging/fix-liftedTry-capturedVars-interaction Fix lift try and captured vars interaction
| * Fix miniphase assembly.Martin Odersky2015-08-151-10/+8
| | | | | | | | | | | | | | | | There were two architectural errors here, which confused TreeTransforms and MiniPhases and which caused "NotDefinedHere" on transformFollowing: 1. TreeTransforms should not have idx fields, MiniPhases have them.2 2. TreeTransformers initialize arrays of MiniPhases not TreeTransforms.
* | Helper to get pickler phase.Dmitry Petrashko2015-08-171-0/+3
|/
* Relax Ycheck for labels after LabelDefsDmitry Petrashko2015-07-131-1/+5
| | | | | | | | LabelDefs reorders labels. As a result of reordering label-def defined inside other label-def could be lifted outside. LabelDefs doesn't update owner chains to represent this. Making treeChecker aware of this.
* Skolemize unstable prefixes in asSeenFromMartin Odersky2015-06-061-0/+3
| | | | | | | | | | | Skolemize unstable prefixes in asSeenFrom provided - the prefix appears at least once in non-variant or contra-variant position - we are in phase typer. After typer, we have already established soundness, so there's no need to do skolemization again. We can simply do the (otherwise unsound) substitution from this-type to prefix.
* Correct a large number of typos.Jason Zaugg2015-05-141-3/+3
| | | | | I scanned the main sources with IntellIJ's spell checker and corrected what showed up.
* Fix #536 - only load member classes of classes that are currently compiled.Martin Odersky2015-05-071-0/+2
| | | | | | | It seems wasteful to load the member classes even of classes that are not currently compiled. It also makes us vulnerable to any misinterpretation of Java file formats. In th particular case of #536, we parsed a class an anonymous Collection$1 which was referring to the type parameter of its enclosing class, but was not diagnosed as an inner class of the enclosing class.
* Make ExtensionMethods#extensionMethods an object methodGuillaume Martres2015-05-011-0/+2
| | | | This method will be needed to implement VCInline.
* Make all Dotty source files end in newline.Dmitry Petrashko2015-04-091-1/+1
|
* Fix #451: support -Ycheck:all.Dmitry Petrashko2015-04-031-1/+2
|
* Addres reviewers comments #377Dmitry Petrashko2015-02-261-1/+1
|
* Bring back support for -YstopBefore and -YstopAfterDmitry Petrashko2015-02-191-11/+13
|
* Allow recomputing phase schedule per pun.Dmitry Petrashko2015-02-191-38/+100
|
* Sharing backend between scalac and dotty.Dmitry Petrashko2014-12-161-0/+3
| | | | | Due to a lot of error and workarounds required for backend not regress in terms of speed, I guess the original idea was to high to be reached.. Nevertheless it was good to try.
* Eliminate GettersSettersMartin Odersky2014-12-141-2/+2
| | | | Has been replaced by Getters, but some traces remained.
* Make sure the period of a context always contains a single phaseMartin Odersky2014-12-141-1/+1
| | | | | Multi-phase periods mean that ctx.phaseId is no longer valid, which means a lot of invariants break.
* Phases: set the period correctlyGuillaume Martres2014-12-121-1/+1
|
* Phases: The operator <= does not need a context anymoreGuillaume Martres2014-12-121-1/+1
|
* Fixed data race in ResolveSuperMartin Odersky2014-11-261-6/+9
| | | | | | | | | | The datarace happened because for method "transform" implemented by ResolveSuper which disambiguated overridden methods. Previously, there was a reference FirstTransform.this.transform of type termRefWithSig to the method implemented in a super trait. Now the same reference points to the newly implemented method. Solved because ResolveSuper now generates symbolic references.
* Phase.runOn is now List[ComliplationUnit] => List[ComliplationUnit]Dmitry Petrashko2014-11-031-2/+6
| | | | Allows to alter number of compilation units.
* Add Patmat to ContextDmitry Petrashko2014-10-301-1/+3
|
* Rename explicitOuter to explicitOuterPhase in PhasesDmitry Petrashko2014-10-121-1/+1
|
* rename AddGetters -> GettersSettersMartin Odersky2014-10-121-1/+3
| | | | ... and add a gettersSettersPhase to Context.
* Allow relaxed typing of applicationsMartin Odersky2014-10-111-0/+5
| | | | | | | | Some transformations encounter applications where new arguments ahve to be supplied. The method type already accounts for these argument but the Application node passed into TreeTransform#transformApply is constructed with a cpy.Apply operation which does a type assignment. That type assignment fails with a parameter mismatch unless relaxedTyping is on.
* Changes from discussion in #171Dmitry Petrashko2014-09-171-2/+3
|
* Generalize phase postcondition checking.Martin Odersky2014-09-061-1/+7
| | | | | | | Have a general way how a phase can establish a postcondition which will be checked each time a later phase is tree-checked. Moves erasure constraints from TreeChecker to Erasure's post condition.
* Changed phase dependencies from names to classes.Martin Odersky2014-08-181-21/+26
| | | | Don't want stringly types for this.
* Rename in Phase: name -> phaseNameMartin Odersky2014-08-181-17/+17
| | | | | Most transformations are subclasses of phase. Having a generic name like `name` in scope everywhere is therefore very risky.
* Disentangle phases from treetransformsMartin Odersky2014-08-091-4/+4
| | | | | | | | TreeTransforms are no longer phases. This allows to generate new transforms in prepare... methods without running into the problem that thee new transforms are undefined as phases. It also makes for a cleaner separation of concerns.
* Made Phase a traitMartin Odersky2014-08-091-1/+1
| | | | | ... so that it can be combined with TreeTransform in a trait composition in a future dientanglement of TreeTransforms and Phases.
* Initial version of RefChecksMartin Odersky2014-08-091-1/+0
| | | | | | | | This is still disabled, because the prepare machinery in transform does not work yet. Concretely, prepare ops need to return a new TreeTransform but that tree transform has an undefined phaase id. We need some architectural changes to disentangle transforms from phases.
* Changed PostTyperTransformer schemeMartin Odersky2014-07-171-14/+4
| | | | | | | | | | | | 1) We now always generate companion objects for classes. This is done in mini-phase "companions", which also assures that companion-modules appear after companion-classes. 2) PostTyperTransformers is gone; the part which normalizes trees has been rolled into TreeTransform and the part which reordered companion classes and modules is now in Companions. Note: Some tests were deisabled; should be re-enabled by Dmitry where needed.
* Fix phase dependencies calculations broken for non-miniphasesDmitry Petrashko2014-05-091-1/+4
|
* isAfterTyper testMartin Odersky2014-05-081-1/+5
| | | | | Add test whether we are after typer. Use it to assert that eta expansion and implicit search do not happen after typer.
* Allow phases to give restrictions on pipeline position.Dmitry Petrashko2014-04-091-1/+22
| | | | | | Phases can now specify which phases should it follow. Tree transforms can additionally specify which TreeTransforms should have finished their processing of compilation units entirely.
* Documentation and a bit of cleanup.Dmitry Petrashko2014-04-011-25/+33
| | | | | | Added documentation for non-trivial logic in Contexts, Phases and TreeTransforms. Removed redundant vars and casts
* Adapting containsPhase to phase groupsMartin Odersky2014-03-311-2/+2
| | | | | A list of names contains a phasegroup if it contains any phase in the group.
* Enable squashed phases by default.Martin Odersky2014-03-291-1/+1
| | | | Squash was accidenbtally turned off before. Is now on again.
* Fix #95: Phases now have their own periods.Dmitry Petrashko2014-03-271-11/+19
|
* Rename methods on FreshContext to make mutation obviousDmitry Petrashko2014-03-271-1/+1
| | | | And avoid name clashes
* Fix context.withPhaseMartin Odersky2014-03-271-1/+1
| | | | | | 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!
* Reworked phases.Martin Odersky2014-03-271-40/+68
| | | | | | | | | | | | | | | Aims 1) next/prev should be context-independent. Phase now stores its ContextBase in a field. 2) More robust handling of phaseNamed and the phase properties erasedTypes, flattened, refchecked, etc. These were previously dependent on when the first call to any of these methods was made, which led to a data race. There is now an init method in phases which centralizes all necessary intialization. It is checked that a phase is initialized only once.
* Allow MiniPhase to be DenotTransformerDmitry Petrashko2014-03-191-13/+63
| | | | | | 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-16/+37
| | | | | | | | 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