summaryrefslogtreecommitdiff
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Added the SYNTHETIC flag for BRIDGE methods. The Eclipse Java compiler ↵Iulian Dragos2012-02-211-1/+1
| | | | complains about duplicate methods otherwise.
* Eliminating duplication in zero creation.Paul Phillips2012-02-202-29/+24
|
* Fix for SI-5215 part 2: generate return value when eliding method callsSzabolcs Berecz2012-02-201-0/+14
|
* A better error message for inheritance conflict.Paul Phillips2012-02-191-1/+9
| | | | | | And some tests for pending. Closes SI-5358.
* Streamlining skolemization, specialization.Paul Phillips2012-02-196-58/+75
| | | | | | Skolemization code doesn't belong in Typers. I carved out a little place for it. Also simplifications in specialization.
* Fix for SI-5215: scalac crash when @elidable used in traitSzabolcs Berecz2012-02-192-15/+6
| | | | The elision is now done by not emitting method calls (it was done by removing the elidable methods).
* Fix [@spec A] to correctly induce AnyRef specialization.Erik Osheim2012-02-191-16/+15
| | | | | | | | | | | While [@specialized A] already tries to include specialization, a bug in specializedOn prevented this from happening: any empty list could mean that the type var was unspecialized, or that it was specialized on everything. The fix is to have this function create the full list of symbols in the case where the @specialized annotation doesn't explicitly include any types.
* More on SI-5500.Paul Phillips2012-02-184-34/+41
| | | | | | A reimagining of erik's patch in 1df4fc6e59 . He did the hard part, this is the batman reboot. I added more tests and tried to make the anyref caching code less fragile.
*-. Merge branch 'master', remote-tracking branch 'non/si-5500' into developPaul Phillips2012-02-1811-54/+44
|\ \
| | * Fixed over-optimistic anyrefSpecCache (closes SI-5500).Erik Osheim2012-02-191-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The basic problem here was that generic type params were getting confused between the various specialized subclasses. For instance, calling typeParamsSubAnyRef(A, C2$mcLI$sp) might return the wrong specialized type param, e.g. C2$mcLZ$sp.A$sp (note the Z instead of the I). The fix is to cache with both the sym (A) and also the clazz (C2$mcLI$sp). This may resolve a whole host of other obscure AnyRef specialization problems.
| * | Cleanup in aisle New.Paul Phillips2012-02-1811-48/+35
| | | | | | | | | | | | More trees created more uniformly.
| | |
| \ \
*-. \ \ Merge remote-tracking branches 'hubertp/issue/5452' and 'hubertp/issue/5493' ↵Paul Phillips2012-02-173-10/+25
|\ \ \ \ | |_|/ / |/| | | | | | | into develop
| | * | Closes #5497.Hubert Plociniczak2012-02-181-2/+6
| | | | | | | | | | | | | | | | Chain contexts by sharing the error buffer, unless you explicitly create a silent context. Review by @odersky
| * | | Closes #5452.Hubert Plociniczak2012-02-172-8/+19
| |/ / | | | | | | | | | | | | | | | | | | | | | Instead of trying to track the fallback attempts we rely on the context state to inform us which fallback is the last one. setError cannot always be called in NoBestMethodAlternativeError because inferMethodAlternative relies on side-effects. Review by @paulp.
* | | Merge remote-tracking branch 'scalamacros/pullrequest/macros' into developPaul Phillips2012-02-174-31/+75
|\ \ \
| * | | Fixes miscellaneous macro bugsEugene Burmako2012-02-174-31/+75
| |/ /
* | | Merge branch 'develop'Paul Phillips2012-02-172-1/+5
|\ \ \ | |_|/ |/| |
| * | Fix for "type _$1 defined twice".Paul Phillips2012-02-172-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually not a fix, only a workaround. Package objects strike again: you don't want to have existentials in there, like this: private val resolverFunction: PartialFunction[Throwable, Try[_]] = ... There are a few irrelevant-to-that-bug changes included which I did while debugging and figured I'd keep them. With this patch I can merge/am merging the scala.concurrent work.
* | | Optimizations.Paul Phillips2012-02-172-8/+14
|/ / | | | | | | | | | | Do cheap tests like x.isImplicit before expensive tests like matchesQuantified. Don't fail to notice that substSym has been called with an empty "from" list and traverse everything anyway.
* | Merge branch 'develop'Paul Phillips2012-02-1710-542/+991
|\ \
| | \
| | \
| *-. \ Merge remote-tracking branches 'VladUreche/issue/5005', ↵Paul Phillips2012-02-1710-542/+991
| |\ \ \ | | |_|/ | |/| | | | | | 'adriaanm/topic/virtpatmat', 'dcsobral/ticket/5439' and 'magarciaEPFL/cleanInliner' into develop
| | | * significantly faster Inliner, with extensive documentation.Miguel Garcia2012-02-173-336/+635
| | |/ | |/| | | | | | | | | | | | | The same inlining decisions are made as before, see -Ylog:inliner, with a focus on lines starting with "[log inliner] Inlining" review by @VladUreche @dragos @paulp
| | * [vpm] simpler implementation of switch emissionAdriaan Moors2012-02-171-30/+13
| | |
| | * [vpm] PF's missingCase, cleaned up isDefinedAt genAdriaan Moors2012-02-174-94/+122
| | |
| | * [vpm] avoid triggering virtualized matchingAdriaan Moors2012-02-171-9/+9
| | |
| | * [vpm] generate proper isDefinedAt for switchesAdriaan Moors2012-02-171-2/+9
| | | | | | | | | | | | don't consider the matcherror-throwing catch-all case (generated by virtpatmat) a default case
| | * [vpm] working type switch for try/catchAdriaan Moors2012-02-175-106/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | catch handlers are now also translated by the virtualizing pattern matcher emit type-based switches when possible, fallback to catch-all with full pattern match (the logic used to emit constant-based switches was generalized to type-based switches, abstracting out how to refer to the scrutinee and the shape of a default/catch-all case) this was the last missing piece of essential functionality now the virtualizing pattern matcher and the old one are mutually exclusive: -Yvirtpatmat disables the old matcher logic completely
| | * remove unused `tree` argument from typedCasesAdriaan Moors2012-02-172-5/+5
| |/
* / Fixed AnyRef specialization.Paul Phillips2012-02-172-26/+39
|/ | | | | | | | | | At least for the value of fix which means "better than it was in 2.9." I accidentally spent a long while trying to fix something I didn't realize I hadn't broken. But then I lucked into partially fixing it, so that's good news. See run/t5488-fn.scala if you want to see what still doesn't work. (It's covered at SI-4770, which is now reopened.) Closes SI-5488.
*-. Merge remote-tracking branches 'axel22/issue/5293', ↵Paul Phillips2012-02-151-4/+21
|\ \ | | | | | | | | | 'szabolcsberecz/synchronized-test' and 'non/si-5005-2' into develop
| | * Improve handling of final and @inline in specialization.Erik Osheim2012-02-151-4/+21
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, the specialize phase removed FINAL from all specialized methods, but left the @inline annotation alone, causing warnings. This patch does two things: 1. It only removes final from the original class' methods which are overridden, while leaving it on the specialized subclasses' methods. 2. When removing final, it also removes @inline, to prevent spurious warnings. This was intended to fix SI-5005, however there are deeper problems which prevent inlining from working even with this fixed.
* | Merge branch 'develop'Paul Phillips2012-02-154-52/+147
|\ \
| | \
| | \
| *-. \ Merge remote-tracking branches 'scalamacros/pullrequest/preprocessreifees' ↵Paul Phillips2012-02-154-52/+147
| |\ \ \ | | |_|/ | |/| | | | | | and 'scalamacros/pullrequest/multilineinterpolation' into develop
| | | * Makes multiline interpolation work finelyEugene Burmako2012-02-151-3/+5
| | | |
| | * | Disables typechecking that precedes reflective compilationEugene Burmako2012-02-142-18/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously toolboxes used to typecheck their inputs before compiling. Actually, the initial demo by Martin first typechecked the reified tree, then ran it, which typechecked it again, and only then launched the reflective compiler. However, as observed in https://issues.scala-lang.org/browse/SI-5464 current implementation of typechecking is not always idempotent. That's why we cannot allow inputs of toolboxes to be typechecked, at least not until the aforementioned issue is closed. This is not only a convention but also a check inside compileExpr.
| | * | Preprocessing for reifeesEugene Burmako2012-02-141-31/+118
| | |/
* | | Revert "Fix for SI-5452."Paul Phillips2012-02-151-3/+1
| | | | | | | | | | | | This reverts commit 2b731911e97a281e324060099631e2374b2144ec.
* | | Revert "Make fix for SI-5452 not break other things."Paul Phillips2012-02-152-7/+4
|/ / | | | | | | This reverts commit a725bf982c06e16c5d533ea6b2227b726db4f7e4.
* | Merge remote-tracking branch 'paulp/objects-and-overrides'Paul Phillips2012-02-153-4/+22
|\ \
| * | matchesType fixup.Paul Phillips2012-02-021-6/+6
| | |
| * | Fix for bad bug with accidental overrides.Paul Phillips2012-02-013-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | An object in a subclass would silently override an inherited method, then throw a CCE at runtime. I blamed this on matchesType and altered it accordingly. There's a pretty extensive test case which reflects my expectations. Review by @odersky please. Closes SI-5429.
* | | Specialization action.Paul Phillips2012-02-144-45/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The crickets at http://www.scala-lang.org/node/11901 were in unanimous agreement that I should proceed as suggested. - No arguments to @specialize gets you 10/10, not 9/10 - Fixed bugs in AnyRef specialization revealed by trying to use it - Specialized Function1 on AnyRef. - Changed AnyRef specialization to use OBJECT_TAG, not TVAR_TAG. - Deprecated SpecializableCompanion in favor of Specializable, which has the virtue of being public so it can be referenced from outside the library. - Cooked up mechanism to group specializable types so we don't have to repeat ourselves quite so much, and create a few groups for illustrative purposes. I'm not too serious about those names but I used up all my name-thinking-up brain for the day. - Updated genprod and friends since I had to regenerate Function1. - Put tests for a bunch of remaining specialization bugs in pending. Closes SI-4740, SI-4770, SI-5267.
* | | Eliminating trailing whitespace in AnyVals.Paul Phillips2012-02-141-15/+15
| |/ |/|
* | Make fix for SI-5452 not break other things.Paul Phillips2012-02-142-4/+7
| | | | | | | | If this looks hacky, that's because it is.
* | Fix for set/list/oops bug in MutableSettings#copy.Paul Phillips2012-02-131-2/+1
| | | | | | | | | | | | | | | | Closes SI-5446. I am morally certain that fixes of this nature could be performed by someone who has logged fewer than ten thousand hours with the compiler.
* | Fix for SI-5452.Paul Phillips2012-02-131-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | Why is calling the error function not enough to register the error, why does "setError(tree)" have to be called as well? That was the cause of this particular stackoverflow. In ContextErrors I see lots of methods which call setError and lots more which do not, and frankly it's all pretty terrifying. There is zero documentation attached to setError. Maybe there's an explanation somewhere I'm not seeing. Review by @hubertp.
* | Fix for SI-5444.Paul Phillips2012-02-134-15/+32
| | | | | | | | | | Fix for trait/impl renaming in 5cbd7d06eb was incomplete. Looks more complete now.
* | Man, these one argument asserts.Paul Phillips2012-02-131-1/+1
| | | | | | | | Some day, outlawed!
* | Modest deverbosification of recent commit.Paul Phillips2012-02-131-17/+6
| | | | | | | | Review by @scalamacros.
* | Merge branch 'master' into developPaul Phillips2012-02-136-46/+91
|\ \