aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Add SyntheticMethods miniphaseMartin Odersky2014-08-115-3/+183
| | | | | New phase for Synthetic Method generation. Scala 2.x did it in Typer, but it's cleaner to do it in a separate phase.
* Sperate matchingDecl and mathingMember.Martin Odersky2014-08-112-15/+24
| | | | RefChecks needs both methods.
* New methods in DefinitionsMartin Odersky2014-08-112-5/+17
| | | | | Also renamed Boolean_and/or to _&&/||, to make it conform to naming convention for other Definition operators.
* Added some more methods as infix tree operations:Martin Odersky2014-08-114-13/+19
| | | | | | asInstance/isInstance/ensureConforms/and/or. They replace some former "mk..." methods.
* Add CaseAccessor flag for case accessorsMartin Odersky2014-08-112-2/+3
| | | | Was missing before.
* Fix Object's scope after ersureMartin Odersky2014-08-111-10/+22
| | | | | | After erasure, former Any members become Object members. Also, fixed some typos and added some TODOs on addBridges.
* Add Product{1,2} supertrait to case classesMartin Odersky2014-08-103-3/+27
| | | | | | | | Case classes with arity <= 1 now also get a ProductN parent trait. This is necessary because we inherit productArity and Element methods in case classes from the ProdictN trait. Needed to add Product0 for this, which is not defined in Scala2.x.
* More targeted eta-liftingMartin Odersky2014-08-104-14/+19
| | | | | | | | Eta-lifting picked some arbitrary base type. It turned out that i94-nada failed once we add a product trait to case classes (in the next commit) because Eta-Kifting picked Product as the base type, even though the target type was bounded by Monad. We now change the scheme so that the target type is included in the lifting, in order to avoid that we lift to useless types.
* Narrow assertion for Scope#enterMartin Odersky2014-08-101-2/+2
| | | | | | Scopes are also used in overriding pairs, and there multiple types with the same name can be entered in a scope. So the assert to the contrary should be limited to typechecking only.
* In refined printer, show only source modifier flags.Martin Odersky2014-08-101-1/+1
| | | | Used to show "mutable var x: T".
* Module vals are lazyMartin Odersky2014-08-102-2/+2
| | | | | | | | | | | | Should have lazy flag set, otherwise forward reference checking would fail for modules. Note: LazyVals needed to be disabled because it also should transform module vals, but didn't do this so far because it only tested the Lazy flag. It turned out the module val transformation exposed some bugs in lazy vals in that LazyVals creates symbols as a side effect and enters them into scopes. Such mutations are allowed onyl in very specific cases (essentially only for local throw-away scopes).
* Disentangle phases from treetransformsMartin Odersky2014-08-0919-148/+167
| | | | | | | | 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.
* ParamAccessors are assumed to have definitionMartin Odersky2014-08-091-1/+1
| | | | Would be flagged as unimplemented members in refChecks otherwise
* Fixed fully qualified name of migration annotationMartin Odersky2014-08-091-1/+1
|
* 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-094-7/+1389
| | | | | | | | 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.
* prepareStats should span all statement transformsMartin Odersky2014-08-091-2/+2
| | | | | Statements are now transformed with the transform returned by prepareStats, analogoys to the other prepare methods.
* Re-enabled checkbounds testsMartin Odersky2014-08-083-6/+6
| | | | | | | | Now that F-bunded types are treated more robustly, we can check bounds for non-emptyness during Typer. This unvealed one wrong test (wonder how that passed scalac?), which got moved to neg.
* LazyRefs break cycles for unpickled typesMartin Odersky2014-08-087-31/+82
| | | | | Insert LazyRefs to break cycles for F-bounded types that are unpickled or read from Java signatures.
* Detect cycles and protected legal ones with LazyRefsMartin Odersky2014-08-088-28/+183
| | | | | | | | | | Cycles are now detected early, when an info is first completed. Legal, f-bounded cycles are broken by a LazyRef, which will construct its type lazily. This makes checkBounds validation of AppliedTypeTrees work (in FirstTransform). Formerly, this stackoverflowed despite the laziness precautions in findMember. Todo: Do the same for class files coming from Java and Scala 2.x.
* Changed first phase normalization and improvements to TreeTransformMartin Odersky2014-08-034-64/+106
| | | | | | | | | | | | | | Two improvements to TreeTransform: 1) Added transformOther functionality which handles trees not handled by other parts 2) Passes down Mode.Pattern in the context when in a pattern. TreeTransform no longer normalizes unknown trees but passes them to transformOther. The former Companions phase has been renamed to FirstTransform. It now performs the following optimizations: - adds companion objects (this was done before) - other normalizations that were formally done in TreeTransform, - rewrite native methods to stubs (this was formally done in RefChecks)
* Type#foreachPartMartin Odersky2014-08-031-3/+9
| | | | Added method to traverse all parts of a type.
* Annotation decorators for symbolsMartin Odersky2014-08-033-9/+45
| | | | | | Added decorators for symbols that can query specific annotations and annotation arguments (for now, -deprecated and -migration are added)
* Added version settings -migration, -sourceMartin Odersky2014-08-034-1/+199
|
* Code to handle overloaded unapply/unapplySeq methodsMartin Odersky2014-08-032-12/+26
| | | | These were not handled before.
* Merge pull request #159 from dotty-staging/transform/elimLocalsDmitry Petrashko2014-08-036-9/+33
|\ | | | | Added elimLocals miniphase
| * Added elimLocals miniphaseMartin Odersky2014-08-036-9/+33
|/ | | | | | | This phase drops the Local flag from all private[this] and protected[this] members. This allows subsequent code motions where code is moved from a class to its companion object. It invalidates variance checking, which is consequently disabled when retyping.
* Merge pull request #147 from dotty-staging/transform/varianceodersky2014-08-0324-49/+584
|\ | | | | transform/variance
| * Added assertion that casts never go to singleton types.Martin Odersky2014-08-031-1/+5
| | | | | | | | Disabled for now, awaiting a fix.
| * Updated commentMartin Odersky2014-08-031-2/+4
| |
| * Enabled variance checkingMartin Odersky2014-08-0310-40/+134
| | | | | | | | | | | | | | Variance checking is now run as part of type-checking. Fixed tests that exhibited variance errors. Added tests where some classes of variance errors should be detected.
| * Two variance-related fixes in DesugarMartin Odersky2014-08-032-5/+15
| | | | | | | | | | | | 1) Type parameter accessors inherit their variance from the type parameter 2) Copy method parameter defaults are annotated @uncheckedVariance. This is necessary because default methods will be checked for variance.
| * Removed CheckTreesMartin Odersky2014-08-034-11/+28
| | | | | | | | | | It was unmaintained and superseded by TreeChecker. The only needed bit, escapingRefs, got moved to Typer.
| * Initial versions of Variances and CheckVariancesMartin Odersky2014-08-035-2/+229
| | | | | | | | Not yet integrated or tested.
| * Added utility method: underlyingSymbolMartin Odersky2014-08-033-2/+16
| |
| * Add showDcl method for SingleDenotationsMartin Odersky2014-08-033-6/+17
| |
| * Preparation for intgeration of RefChecksMartin Odersky2014-08-035-23/+179
|/ | | | | Added OverridingPairs Small tweaks here and there.
* Merge pull request #157 from gkossakowski/name-hashingDmitry Petrashko2014-08-031-0/+3
|\ | | | | Enable improved incremental compilation (name hashing)
| * Enable improved incremental compilation (name hashing)Grzegorz Kossakowski2014-07-251-0/+3
| | | | | | | | | | The algorithm is stable enough to try it out for dotty build. It's enabled in sbt and Akka already.
* | Merge pull request #141 from dotty-staging/transform/repeatedodersky2014-08-0315-42/+142
|\ \ | |/ |/| Transform/repeated
| * Added test case for varargs bridgesMartin Odersky2014-08-032-0/+15
| | | | | | | | | | | | Currently we cannot run this test automatically because the testing framework does not know about .java files. It was run manually and verified that ElimRepeated does was it is supposed to do (create a varargs bridge).
| * Cleanup for varargs bridge.Martin Odersky2014-08-031-5/+10
| | | | | | | | | | | | Now inserts a bridge whenever a method overrides a Java varargs method. This is conservative but safe. We might use a more aggressive scheme, as the one in Scala 2, but it's not clear the win would warrant it.
| * Fixed underlyingIfRepeated.Martin Odersky2014-08-032-12/+7
| | | | | | | | ... and moved to TypeApplications.
| * Fixed tpd.refMartin Odersky2014-08-031-1/+1
| | | | | | | | | | Did not work for this prefixes and other singleon types before. I.d. was generating a SelectFromType tree, which is wrong.
| * Add varargs bridge methodsMartin Odersky2014-08-036-18/+104
| | | | | | | | | | Distinguish translations between Java and Scala varargs methods and add bridges where needed.
| * Adapt signature of <repeated>Martin Odersky2014-08-031-2/+6
| | | | | | | | so that sig(<repeated>[T]) = sig(Seq[T]).
| * Eliminate JavaRepeatedParamClassMartin Odersky2014-08-035-15/+10
|/ | | | | | | Having two repeated param classes (and two types) does not work, because we need to maintain an overriding relationship between Scala repeated param methods and Java repeated param methods (this will be resolved later by bridges).
* Merge pull request #155 from dotty-staging/tailrecTCDmitry Petrashko2014-07-2310-134/+287
|\ | | | | Tailrec tc
| * Fixed typoMartin Odersky2014-07-221-1/+1
| |
| * Defined substitution which follows aliasesMartin Odersky2014-07-223-8/+49
| | | | | | | | | | Used in FullParameterization to substitute type parameters. Fixes test failure for t2399.scala