aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* More better handling of typeTests in patmat.Dmitry Petrashko2014-10-111-10/+21
| | | | Now reuse symbols from typer. Less substitutions -> better performance.
* Make SubstOnlyTreeMaker maintain type-safety.Dmitry Petrashko2014-10-111-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 overriddenMartin Odersky2014-10-113-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 optionalMartin Odersky2014-10-113-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 chainsMartin Odersky2014-10-114-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.
* Fix #167Martin Odersky2014-10-112-3/+7
| | | | Can handle now vararg arguments in patterns.
* Incorporating TypeTestsCasts into ErasureDmitry Petrashko2014-09-244-15/+24
|
* TypeTestsCasts now handles casts to constant types.Dmitry Petrashko2014-09-242-1/+3
|
* More accurate or postcondition conchecking in TreeCheckerMartin Odersky2014-09-242-2/+20
| | | | | | | Previous postcondition checking did not take into account that phases are not flat - they consist in part of macro phases that contain miniphases. In fact the whole set up in Run is dubiuos - we should eliminate the problem at the root, as described in the TODO in run.
* Patmat now succeeds tests.Dmitry Petrashko2014-09-234-13/+22
| | | | @odersky there are some tests disabled, which failed due to other phases being able to transform more code.
* Made TypeVars uncahable keysMartin Odersky2014-09-231-1/+12
| | | | | | | | | | | | TypeVars can appear as keys in baseType caches. The problem is that their base types depend on their instantiation, which is not always know yet when the test is performed. So results of baseType on type variables should never be cached. Todo: check whether there are any other caching problems involving typevars. Conflicts: src/dotty/tools/dotc/core/SymDenotations.scala
* Fix errorneus equality between TermRef and WithFixedSymDmitry Petrashko2014-09-231-1/+2
|
* @odersky have a look.Dmitry Petrashko2014-09-233-4/+5
| | | | testOnly dotc.tests
* Fix problem in unapply typing.Martin Odersky2014-09-233-6/+11
| | | | | | | | | | | | | | GADT bound resetting may only be applied when comparing <pattern type> <: <expected type>, not when comparing the other way around. The fix revealed an error in a test case (t1048) which looks like a real error. Therefore the test got moved to neg. Conflicts: src/dotty/tools/dotc/typer/Applications.scala test/dotc/tests.scala tests/disabled/t1048.scala
* Renamed parameters in Typer&Applictaions.Dmitry Petrashko2014-09-232-12/+13
| | | | Indicating that pt is type of selector is this pattern match makes it easier to follow.
* All pat-mat specific tests succeed now.Dmitry Petrashko2014-09-171-60/+121
| | | | | Except t1048 which infers incorrect type in typer, patmat creates a tree that computes a more precise one that fails to typecheck Disabling erasure due to dozens of "Type BLA is illegal after erasure" errors.
* Fixing periods for explicitOuterDmitry Petrashko2014-09-171-3/+5
|
* Allow skipping Label's in owner chainsDmitry Petrashko2014-09-171-2/+3
|
* Several fixes to patmat.Dmitry Petrashko2014-09-172-49/+43
| | | | Now patmat passes tests but erasure fails.
* Extract ExplicitOuter functionality to be used by patmatDmitry Petrashko2014-09-171-29/+30
|
* More convinient appliedToNoneDmitry Petrashko2014-09-171-2/+8
|
* After merge fixesDmitry Petrashko2014-09-173-18/+9
|
* Remove dead code and add todo about outer tests not being generatedDmitry Petrashko2014-09-171-4/+5
|
* Remaining definitions for patmat.Dmitry Petrashko2014-09-172-3/+16
|
* Fixed unapplySeq. Patmat passes all test suite but typer itself breaks on it.Dmitry Petrashko2014-09-171-3/+12
|
* Everything except unapplySeq doesn't explode.Dmitry Petrashko2014-09-172-69/+48
| | | | That doesn't mean that it works.
* Most of tests succeed now.Dmitry Petrashko2014-09-171-39/+81
|
* More fixes, added _id for internal tracking of failuresDmitry Petrashko2014-09-171-34/+41
|
* more of adapting patmat for dottyDmitry Petrashko2014-09-171-59/+71
|
* Adapting patmat for dottyDmitry Petrashko2014-09-171-28/+43
|
* Helper methods for patmatDmitry Petrashko2014-09-171-13/+53
|
* Pattern expanders for patmatDmitry Petrashko2014-09-171-2/+141
|
* Match translator for patmatDmitry Petrashko2014-09-171-15/+732
|
* add Substitution to patmat.Dmitry Petrashko2014-09-171-69/+119
| | | | Some compilation errors fixed
* TreeMakers for patmatDmitry Petrashko2014-09-171-0/+619
|
* Optimized codegen for patmatDmitry Petrashko2014-09-171-2/+112
|
* CommonCodegen for patMatDmitry Petrashko2014-09-171-4/+140
|
* Common functionality to be shared between patmat and typerDmitry Petrashko2014-09-171-40/+48
|
* Definitions used by patmatDmitry Petrashko2014-09-172-0/+59
|
* Unapply doc updateDmitry Petrashko2014-09-171-0/+1
|
* Making all case classes implement Product. Requires adding Product0Dmitry Petrashko2014-09-171-1/+0
|
* initValue helper methodDmitry Petrashko2014-09-172-17/+21
|
* Definitions used by pattern matcherDmitry Petrashko2014-09-173-6/+34
|
* Changes from discussion in #171Dmitry Petrashko2014-09-175-6/+19
|
* Revert of b2e0e7b4 "tpd.TreeOps#select creates non member syms after erasure."Martin Odersky2014-09-131-2/+1
| | | | | With the new more systematic treatment of fresh symbols in TreeTypeMap, this is no longer ncessary.
* Better TreeTypeMapsMartin Odersky2014-09-1310-58/+151
| | | | | | | | | | | | | | | | 1. They now keep track of changed constructors in templates, updating the class scope as for other members. 2. Any changed members are now entered into the new class scope at exactly the same position as the old one. That ensures that things like caseAccessors still work. 3. ChangeOwners now is reflected in the prefixes of any named types. 4. Newly created classes now get their own ClassInfo type. 5. TreeTypeMaps always crete "fresh" symbols. Fresh symbols do not share a NamedType reference with an existing reference to some other symbol. This obviates b2e0e7b4, which will be reverted. To make it work, the interface of TreeMap changed from an ownerMap function to a substitution-like data structure working with two lists.
* New phase: CapturedVarsMartin Odersky2014-09-124-1/+120
| | | | Breaks out boxing functionality of captured vars from lambda lift.
* Fix handling of Array#clone in ErasureMartin Odersky2014-09-123-4/+5
| | | | | Treat clone like the other primitive array operations, ensure it returns a JavaArray.
* Better failure diagnostic in TreeTransformMartin Odersky2014-09-121-10/+16
| | | | Include a backtrace of nested calls on error.
* Skip label methods in enclosing methodMartin Odersky2014-09-121-1/+3
| | | | | | Otherwise would spuriously treat variables referenced from while loops as captured, because their enclosing method differs from current enclosing method.