aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/Compiler.scala
Commit message (Collapse)AuthorAgeFilesLines
...
* | Closes #579 Implement mini-phase for classOf[T]Alexander Myltsev2015-06-221-1/+2
|/
* Merge pull request #622 from dotty-staging/add/implement-scala2-traitsodersky2015-06-061-1/+2
|\ | | | | Implement Scala2 traits
| * Elim ElimWildcardIdentsMartin Odersky2015-06-011-1/+0
| | | | | | | | | | | | Instead of cleaning up, generate sensical code in the first place. This is shorter and (I would argue) clearer, and also has the advantage that some initializing assignments are not generated at all.
| * Make elimWildcardIdents apply to AssignmentsMartin Odersky2015-06-011-1/+1
| | | | | | | | | | | | | | | | Fixes junit failure in dotty where a lazy val was initialized with a "...$lazy = _" assignment. Moved ElimWiildcard to one group before. It does not really matter where it goes so it might as well go someshere in the middle of the pack.
| * New phase: LinkScala2ImplClassesMartin Odersky2015-06-011-1/+1
| | | | | | | | This phase rewrites supercalls to calls to static implementation class methods.
| * New phase: AugmentScala2TraitsMartin Odersky2015-06-011-0/+2
| |
* | Revert "Fix ElimStaticThis#transformIdent"Dmitry Petrashko2015-06-021-1/+1
|/ | | | | | | | | | | This reverts commit 3d240ad40ccfb570174ec9758bfe68ba4e91eefb. This commit got in without succeding the review. It broke what already was working(inner static objects), and made impossible moving static methods from companion object to companion class. Additionally, commenting or removing assertions is not the way to go, and should not pass review. See discussion here: https://github.com/dotty-staging/dotty/commit/3d240ad40ccfb570174ec9758bfe68ba4e91eefb
* Fix ElimStaticThis#transformIdentGuillaume Martres2015-05-301-1/+1
| | | | | | | | | - Only transform static methods which are inside module classes. - Make sure that the prefix of the underlying type of the Ident is a ThisType of the current module class. For example in "scala.Int.box(42)", "box" is an Ident whose underlying type is "TermRef(ThisType(TypeRef(ThisType(TypeRef(NoPrefix,scala)),Int$)),box)", but we should not trigger an assertion in this case.
* New phase: ElimStaticThisDmitry Petrashko2015-05-291-0/+1
|
* Move classTags before ElimByName.Dmitry Petrashko2015-05-151-2/+2
| | | | To have less interactions with erasure.
* ClassTags: New phase which synthesises class tags.Dmitry Petrashko2015-05-131-1/+2
|
* Allow to compile root import classes without special option.Martin Odersky2015-05-051-5/+3
| | | | | Can now compile Predef/DottyPredef without -Yno-import option. Achieved by making some parts of imports more lazy.
* Merge pull request #509 from dotty-staging/add/expandSAMsDmitry Petrashko2015-05-041-0/+1
|\ | | | | Expand SAM closures to anonymous classes if needed
| * New miniphase: ExpandSAMsMartin Odersky2015-05-021-0/+1
| | | | | | | | The phase replaces SAM closures with anonymous classes when necessary.
* | Honor -Yno-imports flagMartin Odersky2015-05-041-1/+3
| | | | | | | | If the flag is set, no root imports are added.
* | Merge pull request #517 from dotty-staging/add/expand-privatesodersky2015-05-041-1/+6
|\ \ | |/ |/| Expand private members if necessary
| * New miniphase: ExpandPrivateMartin Odersky2015-05-011-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | A late miniphase which resets private flag of all members that are not accessed from within same class. Replaces logic in RefChecks. Doing this late has two advantages - we can use name expansion, because references are symbolic, so the names of symbols and references to them do not need to correspond anymore. - we can automatically correct for symbols moved in earlier phases (e.g. lifted out by LambdaLift).
* | Merge pull request #507 from dotty-staging/add/from-tastyDmitry Petrashko2015-05-021-2/+6
|\ \ | | | | | | Compile from Tasty
| * | Compiler for embedded TASTY info.Martin Odersky2015-04-281-2/+6
| | | | | | | | | | | | `FromTasty` is a main module which compiles TASTY info instead of sources.
* | | New phase: VCInline which inlines value classes callsGuillaume Martres2015-05-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This corresponds roughly to step 2 of SIP-15 and to the peephole optimizations of step 3. The extractors in TreeExtractors are copied or inspired from src/compiler/scala/tools/nsc/ast/TreeInfo.scala in scalac.
* | | New phase: ElimErasedValueTypeGuillaume Martres2015-05-011-1/+2
| |/ |/| | | | | | | This phase erases ErasedValueType to their underlying type, in scalac this was done in PostErasure.
* | Compiler: add comment on problems in late phases.Dmitry Petrashko2015-04-301-2/+2
| |
* | Make LazyVals implement non-static modules. Move LV after erasure.Dmitry Petrashko2015-04-301-2/+2
|/
* Merge pull request #495 from dotty-staging/refactor/SuperAccessorsDmitry Petrashko2015-04-281-6/+4
|\ | | | | Refactor/super accessors
| * Swap Pickler and FirstTransformMartin Odersky2015-04-221-1/+1
| | | | | | | | This means we now also pickle Imports and NamedArgs.
| * Roll SyntheticMethods into PostTyperMartin Odersky2015-04-221-4/+3
| |
| * Roll InstChecks into PostTyperMartin Odersky2015-04-221-1/+0
| | | | | | | | | | Move InstChecks functionality into PostTyper in order to save a separate traversal.
| * Super accessor refactoringMartin Odersky2015-04-221-1/+1
| | | | | | | | | | | | | | | | | | New phase: PostTransform, runs after Typer. SuperAccessors and ParamForwarders (renamed from ForwardParamAccessors) are helper objects of post transform. Next: Add instChecks as well.
* | Merge pull request #488 from dotty-staging/functionalInterfacesDmitry Petrashko2015-04-231-1/+2
|\ \ | |/ |/| New phase: FunctionalInterfaces. Rewires closures to implement more specific types of Function SAMs.
| * New phase: FunctionalInterfaces.Dmitry Petrashko2015-04-201-1/+2
| | | | | | | | Rewires closures to implement more specific types of Function SAMs.
* | Added phase to check `New` nodes for instantiability.Martin Odersky2015-04-131-1/+2
|/ | | | | | - Abstract classes cannot be instantiated (exceptions: parent news and Java annotations) - Instantiateed class must conform to its self type.
* Make all Dotty source files end in newline.Dmitry Petrashko2015-04-091-1/+1
|
* Bringing tailrec back to group: cannot trigger failure.Dmitry Petrashko2015-03-301-4/+2
|
* New phase trait constructors.Dmitry Petrashko2015-03-251-1/+1
| | | | | Renames constructors in traits so that backend will call them with invokeInterface, instead of invokeSpecial Also makes sure that renamed constructor bodies conforms to type of method
* Compute PureInterface flag after pickling.Martin Odersky2015-03-181-1/+1
| | | | | | | | | | ElimLocals becomes a slightly less trivial transform: NormalizeFlags. It also computes PureInterface flag, thus relieving Namer and Unpickler from doing the same in two different ways. Besides, the computation in Namer/TreeInfo was flawed because it did not take into account that nested non-static classes are not allowed in an interface (only static classes are, but these would not be members of the interface in the Scala sense).
* Turn on pickling.Martin Odersky2015-03-181-1/+1
|
* New phase: ElimWildcardIdents.Dmitry Petrashko2015-03-111-1/+1
| | | | | Ident('_') was reaching backend in rhs of body of initialiser methods. This phase replaces those initialisers with default values of corresponding type.
* Compiler#newRun: reset the context _before_ initializing a new runGuillaume Martres2015-03-101-5/+3
| | | | | Previously it was incorrectly done after the run was initialized, this fixes #391.
* Move ElimByName as late as possible.Martin Odersky2015-03-101-1/+1
| | | | | | ElimByName might be merged with erasure, so we can alreayd move it as close a pssoble to it. Verified that it can't be moved beyong ResolevSuper, but not why.
* Allow recomputing phase schedule per pun.Dmitry Petrashko2015-02-191-1/+1
|
* Added test to TreeChecker that guards against orphan parameters.Martin Odersky2015-02-111-1/+1
| | | | | | | | | | | Currently, tests fail. The failures I checked are all related to tailcalls. Not sure whether there are others. This is a blocker for serialization. Orphan parameters cannot be serialized. Maybe rethink the position of tailcalls? It looks to me that the repeated trouble it gives us is more than the effort required to put an efficient tailcall recognition after pattern matching in place. But I might be wrong.
* Bring back lazyVals. Changed encoding of local lazy vals.Dmitry Petrashko2015-02-031-2/+3
| | | | Now the scheme doesn't introduce circular dependencies between container vals.
* Fixed soundness hole in TypeComparerMartin Odersky2015-01-191-2/+4
| | | | | | | Two named types with same names and NoPrefix prefixes are not necessarily equal! The fix uncovered an error in tailrec. When run on Decorators.scala, tailrec in its old position at the end of a group produces not -Ycheckable code. Problem was fixed by moving TailRec into its own group.
* Disable PrivateToStatic until it is fixed.Dmitry Petrashko2014-12-161-1/+1
|
* Implemented handling of <label> DefDefs in backend.Dmitry Petrashko2014-12-161-2/+2
|
* Enable new phases.Dmitry Petrashko2014-12-161-1/+5
|
* Add new SeqLiterals phase.Martin Odersky2014-12-031-0/+1
| | | | | Replaces SeqLiterals by JavaSeqLiterals, because the latter's (array-)type is preserved after erasure.
* More docs and removing print statementsMartin Odersky2014-11-091-2/+1
|
* Merge mixin with the group of miniphases following it.Martin Odersky2014-11-091-2/+2
|
* Merge memoize with miniphases following it into one group.Martin Odersky2014-11-091-4/+4
|