aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix and enable RefChecksMartin Odersky2014-08-1310-58/+76
| | | | RefChecks is now enabled. Some of the tests had to be fixed to be refchecks-correct.
* Change access boundary of protected[this]Martin Odersky2014-08-131-1/+1
| | | | Should be `base`, was the class enclosing the definition.
* Erasure should copy denotations only if they are changed.Martin Odersky2014-08-131-6/+11
|
* Package denotations are never transformedMartin Odersky2014-08-134-9/+19
| | | | | | | | | | | | Packages should always have a single denotation, which is invariant for all transformations. Package members should always be entered in the first phase, and should never be entered after a given phase. This reflects the fact that package members correspond to classfiles. Once you create a classfile, it stays around and is available from the start of the next run. Also, we need to prevent multiple denotation versions of packages from hanging on to stale symbols. It would not be enough to replace a package member by a newly compiled one; if packages had multiple denotations we'd have to do this for all of them.
* mergeDenot should prefer concerete over deferred.Martin Odersky2014-08-121-3/+6
| | | | | | Previously it did this only sometimes. Now it always prefers concrete over deferred unless the deferred info is a proper subtype of the concrete info.
* Add matchesLooselyMartin Odersky2014-08-122-1/+11
| | | | | For overriding checks we need a concept where a val can match a def. Normal matches does not provide this.
* Two fixes in desugarMartin Odersky2014-08-121-2/+4
| | | | | | | (1) set position of companion object def (2) companions of case classes taking multiple parameter lists do not inherit from a function type (reason: we can't straightforwardly converyt a curried method with multiple parameter lists to a function value).
* Fix a problem due to different type inferenceMartin Odersky2014-08-121-2/+6
|
* Use _1 intstead of get for accessing unary case class parametersMartin Odersky2014-08-111-3/+1
| | | | | Now that caes classes always inherit from ProductX, we can avoid the special case. (We need to define _1 anyway to implement Product1).
* Avoid printing expanded namesMartin Odersky2014-08-111-1/+1
| | | | If a TypeRef with an expanded name is an alias type, print the alias instead.
* 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