Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Completed constructors phase | Martin Odersky | 2014-10-11 | 2 | -71/+141 |
| | | | | | | | 1) Type parameters are now copied to accessors 2) Constructors also work for traits 2) makes it possible do to mixin after constructors. | ||||
* | Fix rewriting of by-name class parameter accessors. | Martin Odersky | 2014-10-11 | 1 | -2/+6 |
| | | | | Like the corresponding parameters, these also need to be rewritten to function types. | ||||
* | Combine captured vars and constructors into one macro phase. | Martin Odersky | 2014-10-11 | 2 | -3/+2 |
| | | | | Needed to fix a problem in CapturedVars to make this work. | ||||
* | Add constructors phase | Martin Odersky | 2014-10-11 | 3 | -19/+123 |
| | |||||
* | Fix to primaryConstructor | Martin Odersky | 2014-10-11 | 3 | -3/+12 |
| | | | | | Primary constructor was picking last constructor instead of first one. This is now fixed. Also, added paramAccessors utility method. | ||||
* | Account for PolyProto and IgnoredProto types in expectedTypeStr | Martin Odersky | 2014-10-11 | 1 | -2/+4 |
| | |||||
* | New utility methods in SymUtils | Martin Odersky | 2014-10-11 | 2 | -7/+26 |
| | |||||
* | Fix tree typing to account for trees after constructors is run. | Martin Odersky | 2014-10-11 | 4 | -19/+25 |
| | |||||
* | Fix handling of type params in secondary constructors | Martin Odersky | 2014-10-11 | 1 | -4/+1 |
| | | | | | | | | | Params are already added by Desugar. No special treatment needed here. Besides primaryConstructor.typeParams is always empty, because term symbols do not have type parameters. The fix turns t2660.scala into an error. I believe the error is correct, hence the test was moved with a comment to neg. | ||||
* | Uncurry also in DefDef trees, not just in infos. | Martin Odersky | 2014-10-11 | 1 | -1/+1 |
| | |||||
* | Drop type declarations from erased ClassInfo | Martin Odersky | 2014-10-11 | 2 | -2/+20 |
| | | | | Need to drop all non-class type declarations. | ||||
* | Erasure should keep prefix in termrefs. | Martin Odersky | 2014-10-11 | 1 | -3/+3 |
| | | | | The current formulation of lambda lift is easier to do if that's the case. | ||||
* | Take environment into account when typing a closure. | Martin Odersky | 2014-10-11 | 3 | -4/+10 |
| | | | | Environment parameters do not count in th eresult type. | ||||
* | Allow relaxed typing of applications | Martin Odersky | 2014-10-11 | 2 | -2/+7 |
| | | | | | | | | 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. | ||||
* | Treat @static as a source flag. | Martin Odersky | 2014-10-11 | 1 | -1/+1 |
| | | | | It changes meaning drastically so should always be visible. | ||||
* | Take receiver into account when selecting default getters. | Martin Odersky | 2014-10-11 | 1 | -43/+53 |
| | | | | | | Previously, we determined the default getters solely from the method TermRef type. This is wrong if the method is prefix is not a path -- the prefix of the term ref will be a TypeRef and the getter selection will be a SelectFromType tree, which makes no sense. | ||||
* | Replace tree.withName with {tpd|untpd}.rename.tree | Martin Odersky | 2014-10-11 | 5 | -18/+28 |
| | | | | Advantage: Can rename typed as well as untyped trees. | ||||
* | Fix lifting of application: | Martin Odersky | 2014-10-11 | 1 | -1/+13 |
| | | | | | Lifting an application `f(arg1).f(args)` requires lifting of the whole prefix `f(arg1)`, because `f` might have a side effect. | ||||
* | Add isProperlyContainedIn method | Martin Odersky | 2014-10-11 | 2 | -2/+5 |
| | |||||
* | Make enteredAfter, installAfter more forgiving as to when they are called. | Martin Odersky | 2014-10-11 | 2 | -28/+26 |
| | | | | | Instead of requiring to be called a given phase, change the context if that is not the case. | ||||
* | Facturing out EnclosingMethodTraverser from CapturedVars | Martin Odersky | 2014-10-11 | 2 | -15/+26 |
| | | | | | The idea to traverse with currently enclosing methid is also used in LambdaLift and could be used elsewhere. | ||||
* | Replace call to unimplemented method runtimeCall | Martin Odersky | 2014-10-11 | 2 | -4/+2 |
| | | | | Use ref and appliedTo instead. | ||||
* | Merge pull request #174 from dotty-staging/reb | Dmitry Petrashko | 2014-10-11 | 87 | -1945/+7574 |
|\ | | | | | Pattern matcher | ||||
| * | Cleanup patmat based on feedback | Dmitry Petrashko | 2014-10-11 | 1 | -72/+53 |
| | | | | | | | | from pr #174. | ||||
| * | make appliedToNone fail for exprType, use appliedIfMethod instead | Dmitry Petrashko | 2014-10-11 | 3 | -8/+9 |
| | | | | | | | | | | see discussion in https://github.com/dotty-staging/dotty/commit/0c551f00f43c1675aca3adbff7567f47432c66f6 | ||||
| * | prevPhase should indicate previous phase in explicitOuter | Dmitry Petrashko | 2014-10-11 | 1 | -4/+4 |
| | | | | | | | | | | Makes it less confusing as thisTransformer is already used for the ExplicitOuter itself | ||||
| * | Follow standard naming pattern in LazyVals | Dmitry Petrashko | 2014-10-11 | 2 | -14/+4 |
| | | |||||
| * | Use more efficient type comparisons | Dmitry Petrashko | 2014-10-11 | 2 | -16/+16 |
| | | | | | | | | isRef is more efficient than subtyping check. | ||||
| * | Make widening ops more systematic & complete | Martin Odersky | 2014-10-11 | 1 | -7/+14 |
| | | | | | | | | | | 1) strip TypeVars wehere necessary before widening 2) allow the combination of widening and dealiasing, in any order. | ||||
| * | Cleanup patmat. | Dmitry Petrashko | 2014-10-11 | 1 | -83/+12 |
| | | |||||
| * | Seems to be a bug ping @odesrky | Dmitry Petrashko | 2014-10-11 | 1 | -0/+1 |
| | | |||||
| * | Fix SymDenotation.isPrimaryConstructor | Dmitry Petrashko | 2014-10-11 | 1 | -1/+1 |
| | | | | | | | | .denot was missing | ||||
| * | Document why patternMatcher needs to be after tailrec. | Dmitry Petrashko | 2014-10-11 | 2 | -1/+4 |
| | | |||||
| * | Allow extensions methods to play well with tailrec. | Dmitry Petrashko | 2014-10-11 | 3 | -5/+13 |
| | | |||||
| * | Join megaphases. Saves 80 out of 200 seconds for dotc.tests | Dmitry Petrashko | 2014-10-11 | 1 | -3/+3 |
| | | |||||
| * | Make Extension methods a miniphase | Dmitry Petrashko | 2014-10-11 | 1 | -44/+47 |
| | | |||||
| * | Enable outer tests in pattern matcher. | Dmitry Petrashko | 2014-10-11 | 2 | -8/+18 |
| | | | | | | | | And a test for this. | ||||
| * | Move check for casting a primitive to a non-primitive type from erasure to ↵ | Dmitry Petrashko | 2014-10-11 | 2 | -5/+18 |
| | | | | | | | | refchecks | ||||
| * | Make LazyVals an IdentityDenotTransformer | Dmitry Petrashko | 2014-10-11 | 1 | -6/+2 |
| | | |||||
| * | Fixed needs outer test | Martin Odersky | 2014-10-11 | 2 | -3/+4 |
| | | |||||
| * | Fixed assertion to enfornce idempotency of substitutions | Martin Odersky | 2014-10-11 | 1 | -2/+2 |
| | | |||||
| * | Enabling lazy vals. | Dmitry Petrashko | 2014-10-11 | 1 | -1/+1 |
| | | | | | | | | Unit tests still to-be-fixed | ||||
| * | Fixing owner releated error in lazy vals. | Dmitry Petrashko | 2014-10-11 | 1 | -1/+1 |
| | | | | | | | | | | When lazy val body is moved to a init method the owner of symbols in tree should change | ||||
| * | Setters are not case accessors | Martin Odersky | 2014-10-11 | 1 | -1/+1 |
| | | |||||
| * | Porting lazy vals to a new scheme. | Dmitry Petrashko | 2014-10-11 | 1 | -57/+33 |
| | | |||||
| * | More better handling of typeTests in patmat. | Dmitry Petrashko | 2014-10-11 | 1 | -10/+21 |
| | | | | | | | | Now reuse symbols from typer. Less substitutions -> better performance. | ||||
| * | Make SubstOnlyTreeMaker maintain type-safety. | Dmitry Petrashko | 2014-10-11 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | Implementation of pattern sel match { x => <body> } used to replace references to x by references to sel in <body>. This is not type correct and it also requires additional traversal of body. Now SubstOnlyTreeMaker generates a `x = sel` statement. | ||||
| * | Make productArity a synthetic method which can be overridden | Martin Odersky | 2014-10-11 | 3 | -4/+5 |
| | | | | | | | | | | | | Like other synthetic methods, productArity will not be generated if an explicit definition is given. Used to be generated unconditionally in desugaring. | ||||
| * | Make rejection of deep subtype call stack optional | Martin Odersky | 2014-10-11 | 3 | -4/+2 |
| | | | | | | | | | | | | Move flag that throws exception on deep subtyping stacks from Config varianble to setting. Disable setting for core-pickling which had a deep subtype failure after pattern matcher was integrated. Todo: Figure out why the subtype stack got so deep. | ||||
| * | Make changeOwner more robust regarding non-standard owner chains | Martin Odersky | 2014-10-11 | 4 | -17/+41 |
| | | | | | | | | | | | | | | | | | | | | | | The problem is running changeOwner(from, to) where - from is a ValDef or a Label - an embedded definition has as owner not `from` but some owner of `from`. We allow such denomrlaized owners and the pattern matcher generates them. This patch makes changeOwner take these situations into account. |