aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Move ElimByName as late as possible.Martin Odersky2015-03-103-2/+4
| | | | | | 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.
* Merge pull request #388 from dotty-staging/drop/throwodersky2015-03-0610-63/+46
|\ | | | | Drop/throw
| * Implement handling of synthetic throw method in backend.Dmitry Petrashko2015-03-051-4/+11
| | | | | | | | Having backend abstracted away from AST helps a lot here.
| * Eliminate Throw as a typed TreeMartin Odersky2015-03-049-57/+27
| | | | | | | | | | | | | | | | Replace with <compiler-ops>.throw(exception) Only leave Throw as an untyped tree.
| * Create OpsPackage to hold compiler-interpreted symbolsMartin Odersky2015-03-042-5/+11
| | | | | | | | | | | | | | | | Compiler interpreted methods now have a home in OpsPackage. The first such symbol is dummyApply. But other symbols representing primitive operations (e.g. array operations) could also go there.
* | Merge pull request #383 from smarter/fix/fullyParameterizedDefDmitry Petrashko2015-03-051-0/+6
|\ \ | |/ |/| FullParameterization: fix rewiring of Returns
| * FullParameterization: fix rewiring of ReturnsGuillaume Martres2015-03-021-0/+6
| | | | | | | | | | The `from` field of a Return tree should either be EmptyTree or an Ident corresponding to the method we're returning from.
* | Fix bug which prevented New over type-instantiated aliases.Martin Odersky2015-02-282-10/+9
|/ | | | | | | | | | | Previously, type Map = HashMap[Int, String] new Map did not work. See test aliasNew.scala for a test. Formerly this logic handled in Parsers (wrapNew), but that one does not work for aliastypes.
* Fix of #375 - adapt returned value in erasureMartin Odersky2015-02-261-1/+9
|
* Merge pull request #377 from dotty-staging/ycheck-is-a-phaseDmitry Petrashko2015-02-266-59/+127
|\ | | | | make Ycheck a phase
| * Addres reviewers comments #377Dmitry Petrashko2015-02-262-3/+3
| |
| * Bring back support for -YstopBefore and -YstopAfterDmitry Petrashko2015-02-192-15/+15
| |
| * Adjust periods to allow up to 64 phases.Dmitry Petrashko2015-02-191-3/+3
| |
| * Allow recomputing phase schedule per pun.Dmitry Petrashko2015-02-193-48/+106
| |
| * Allow disabling squarshingDmitry Petrashko2015-02-191-3/+6
| | | | | | | | Do not die if phases aren't squashed
| * Make TreeChecker a phaseDmitry Petrashko2015-02-191-1/+8
| |
* | fix ambiguous reference when loading "equals" of object "BoxesRuntime"Dmitry Petrashko2015-02-251-1/+1
| |
* | Fix for #371Martin Odersky2015-02-241-1/+2
|/ | | | | | | | | | This causes backend to fail with ambiguous reference when loading member "equals" of object "BoxesRuntime". The reference is indeed ambiguous. BoxesRunTime has a two paremeter equals method and, with the fix, inherits the one-parameter method from Object. The backend needs to disambiguate, e.g. by demanding the `decl` equals in BoxesRunTime instead of the member.
* Fix hashCode method for value classesGuillaume Martres2015-02-171-3/+17
| | | | | | Before this commit, we used the same implementation than for case classes. After this commit, we use the hashCode of the underlying type as defined in SIP-15.
* Fix equals method for value classesGuillaume Martres2015-02-152-1/+8
| | | | | | | | | | | | | | | | | Before this commit, the following class: class VC(val x: Int) extends AnyVal resulted in the creation of the method: def equals(val x$0: Any): Boolean = x$0 match { case x$0 @ _: VC => true case _: Any => false } After this commit, we get instead: def equals(val x$0: Any): Boolean = x$0 match { case x$0 @ _: VC => VC.this.a.==(x$0.a) case _: Any => false }
* Merge pull request #359 from dotty-staging/fix/erasure-lub-alternativeDmitry Petrashko2015-02-133-48/+81
|\ | | | | Fix/erasure lub alternative
| * Do not box Unit inside try, match and if branches.Dmitry Petrashko2015-02-131-2/+7
| |
| * Rework LabelDefs. Fixes boxing of a unit label killing backend.Dmitry Petrashko2015-02-131-45/+58
| | | | | | | | | | | | | | | | Though still it would be better if erasure didn't emmit such trees, but still it's better to have this phase kore robust. Also made LabelDefs run in linear time on the size of tree instead of square on the Block-depth of tree.
| * A small fix in patmat: doesn't change the behaviour, but makes easier to ↵Dmitry Petrashko2015-02-131-1/+1
| | | | | | | | | | | | understand. if(self eq self) was optimised away, not it's not even emited
| * Alternative scheme to handle branchingMartin Odersky2015-02-111-23/+16
| | | | | | | | | | | | The new scheme alignes If, Match, Try to the scheme used in SeqLiteral. This favors unboxed over boxed types. It is also simpler than the scheme in the previous commit.
| * Removed extraneous debug println.Martin Odersky2015-02-111-9/+1
| |
| * Insert correct boxing/unboxing conversions for branchesMartin Odersky2015-02-111-0/+30
| | | | | | | | ... of an If, Match, or Try. Fixes #355.
* | Merge pull request #358 from dotty-staging/backend-backportsDmitry Petrashko2015-02-126-8/+38
|\ \ | | | | | | Backend discovered issues
| * | Check period validity once per run.Dmitry Petrashko2015-02-122-7/+3
| | |
| * | Assert for overflows in PeriodsDmitry Petrashko2015-02-111-3/+15
| | |
| * | Disable t2667 that fails inside Extension methods.Dmitry Petrashko2015-02-111-1/+1
| | | | | | | | | | | | This info transformation was left untriggered before backend was enabled.
| * | Fix #348 flatten short name shouldn't include package namesDmitry Petrashko2015-02-113-2/+17
| | |
| * | Fix #349 module class after erasure could have selfType be a MethodTypeDmitry Petrashko2015-02-111-2/+9
| |/ | | | | | | ExprType erases to MethodType and need to be handled.
* | Fix of the escaping MethodParam problemMartin Odersky2015-02-123-57/+102
| | | | | | | | | | | | The issue was in the dependency tracking for MethodTypes. We treated methods with false dependencies as non-dependent (as they should be), but in that case the ResultType could contain orphan MethodParams.
* | Added test to TreeChecker that guards against orphan parameters.Martin Odersky2015-02-112-1/+20
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Prevent block types with references to local symbolsGuillaume Martres2015-02-111-1/+1
| |
* | Merge pull request #345 from olhotak/fix-javamethodtypeodersky2015-02-111-1/+5
|\ \ | |/ |/| Fix JavaMethodType creation and parameter matching of JavaMethodTypes
| * Java methods: JavaMethodType instead of MethodType, convert Object to AnyOndrej Lhotak2015-02-071-1/+5
| | | | | | | | | | | | | | | | | | | | Fixes two bugs needed for java-override test: Namer was creating a MethodType instead of a JavaMethodType even though the JavaDefined flag was set on the DefDef. Following Scalac, Namer needs to convert Java method parameters of type j.l.Object to s.Any.
* | Fixed doc comment.Martin Odersky2015-02-101-1/+0
| |
* | After boxing its value, a captured var should become a val.Martin Odersky2015-02-101-6/+2
| | | | | | | | As noted by @sjrd.
* | Make line search logic in SourcePositions generally available.Martin Odersky2015-02-072-6/+36
|/ | | | Create an object Util for utility methods that are used in several places.
* Merge pull request #339 from dotty-staging/fix/#329-and-othersodersky2015-02-077-45/+47
|\ | | | | Fix/#329 and others
| * Revert following underlyingIfRepeated when matchingMartin Odersky2015-02-071-1/+1
| | | | | | | | | | | | | | This was a left-over from a failed attempt to have OverridingPiars work exclusively by comparing signatures. If we do that then repeated and underlying do have the same signature and therefore are supposed to match. But as @retronym notes, this leads to problems. In any case, we no longer try to make overriding pairs work that way, because it fails for other reasons as well.
| * Tweaks to matchesMartin Odersky2015-02-073-8/+3
| | | | | | | | | | 1) Drop redundant signature comparison in overriding pairs 2) Abstract from repeated parameters when calculating matches
| * New spec and implementation for matching.Martin Odersky2015-02-073-34/+27
| | | | | | | | | | Reformulated matchign spec and implemented accordingly. Previous fix for #329 would have missed third new error case in over.scala.
| * Fix of #329.Martin Odersky2015-02-071-1/+1
| | | | | | | | Overriding pairs needs to match ExprTypes with field types. Closes #329.
| * Fixes handling of op-assignments for polymorphic apply/update.Martin Odersky2015-02-073-6/+20
| | | | | | | | See t3252 for a test case.
* | Merge pull request #344 from dotty-staging/fix/refined-subtypingodersky2015-02-072-480/+4
|\ \ | |/ |/| Removed TrackingConstraint
| * Removed TrackingConstraintMartin Odersky2015-01-312-480/+4
| | | | | | | | | | | | | | It's too hard to keep fixes up-to-date in both constraint implementations. And anyway, OrderingConstraint is it for now. Also added comment suggested by @smarter.
* | Merge pull request #346 from dotty-staging/local-lazy-valsodersky2015-02-075-53/+82
|\ \ | | | | | | Bring back lazy vals. Changed encoding scheme of local(non-field) lazy vals