summaryrefslogtreecommitdiff
path: root/src/compiler
Commit message (Collapse)AuthorAgeFilesLines
* applyOrElse is a synthetic method.Paul Phillips2012-11-191-1/+1
|
* Deal with possibly spurious warning in Macros.Paul Phillips2012-11-191-4/+4
|
* Merge pull request #1626 from paulp/issue/6357Adriaan Moors2012-11-191-1/+2
|\ | | | | Fix for SI-6357, cycle with value classes.
| * Fix for SI-6357, cycle with value classes.Paul Phillips2012-11-141-1/+2
| | | | | | | | Don't force the owner info.
* | Merge pull request #1581 from lrytz/typerCommentAdriaan Moors2012-11-161-2/+3
|\ \ | | | | | | comment / question in typers
| * | comment / question in typersLukas Rytz2012-11-061-2/+3
| | |
* | | Merge pull request #1635 from paulp/slick-regression-2Adriaan Moors2012-11-161-11/+30
|\ \ \ | | | | | | | | Fix for overly eager package object initialization.
| * | | Fix for overly eager package object initialization.Paul Phillips2012-11-151-11/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A subtle change in the order in which symbol attributes were inspected (now you know why I avoid vals in the compiler) led to a cycle during initialization for slick. I'm afraid I don't know how to reproduce the issue outside of slick and sbt, so I added some logging instead. After some challenges juggling general correctness and cycle avoidance, I resorted to improving and documenting the logic as well. I predict reviewer will be pleased.
* | | | Merge pull request #1586 from retronym/ticket/6247Adriaan Moors2012-11-161-4/+4
|\ \ \ \ | | | | | | | | | | Optimize primitive Array(e1, ..., en)
| * | | | More principled tree copying.Jason Zaugg2012-11-071-1/+1
| | | | | | | | | | | | | | | | | | | | Canonical > home-spun.
| * | | | Optimize primitive Array(e1, ..., en)Jason Zaugg2012-11-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Expands an existing optimization for reference arrays to apply to primitives, as well. Fixes one aspect of SI-6247.
* | | | | Merge pull request #1623 from paulp/merge-2.10.xAdriaan Moors2012-11-168-19/+51
|\ \ \ \ \ | |_|/ / / |/| | | | Merge 2.10.0-wip/.x into master
| | | | |
| | \ \ \
| *-. \ \ \ Merge remote-tracking branches 'origin/2.10.x' and 'origin/2.10.0-wip' into ↵Paul Phillips2012-11-148-19/+51
| |\ \ \ \ \ | | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | master Conflicts: src/compiler/scala/tools/nsc/transform/ExtensionMethods.scala
| | | * | | Merge pull request #1608 from retronym/ticket/6644Josh Suereth2012-11-141-3/+1
| | | |\ \ \ | | | | | | | | | | | | | | SI-6644 Account for varargs in extmethod forwarder
| | | | * | | SI-6644 Account for varargs in extmethod forwarderJason Zaugg2012-11-101-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Which sounded difficult, so instead I offshored the work to the friendly republic of TreeGen.
| | | * | | | SI-6646 Fix regression in for desugaring.Jason Zaugg2012-11-101-1/+1
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The early check in the parser of pattern irrefutability, added in c82ecab, failed to consider InitCaps and `backquoted` identifiers.
| | * | | | Merge pull request #1585 from retronym/ticket/6539-2Eugene Burmako2012-11-141-0/+11
| | |\ \ \ \ | | | | | | | | | | | | | | SI-6539 Annotation for methods unfit for post-typer ASTs
| | | * | | | Refine @compileTimeOnlyJason Zaugg2012-11-081-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Don't default the message, and show it exclusively. - Fix cut-and-pasto in the @since tag - Be tolerant if the annotaion class is missing, as seems to have been the case compiling the continuations plugin. - s/\t/ / in the test file to show the errors are positioned correctly. - Use defensive getOrElse
| | | * | | | SI-6539 Annotation for methods unfit for post-typer ASTsJason Zaugg2012-11-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivated by the `.value` method in the SBT task-syntax branch, which should only be called within the context of the argument to a setting initialization macro. The facility is akin to a fatal deprecation.
| | * | | | | Merge pull request #1618 from scalamacros/ticket/6662Eugene Burmako2012-11-141-1/+1
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | Fix for SI-6662, macro failing too early.
| | | * | | | | Fix for SI-6662, macro failing too early.Paul Phillips2012-11-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't give up before you try tupling. Who knows what someone might be doing with a Unit.
| | * | | | | | Merge pull request #1583 from dragos/issue/fix-6616Adriaan Moors2012-11-131-9/+32
| | |\ \ \ \ \ \ | | | |/ / / / / | | |/| | | | | SI-6616 Check that unsafe operations are only called on the presentation...
| | | * | | | | SI-6616 Check that unsafe operations are only called on the presentation ↵Iulian Dragos2012-11-061-9/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | compiler thread. The method that checks the actual constraint is @elidable, expecting it to be used for nightly builds but stripped-off in release builds. This way we don't lose any performance, but 'fail-fast' in IDE nightlies. This assumes that release builds will have at least `-Xelide-below ASSERTION`, but this pull request does not do that.
| | * | | | | | Merge pull request #1610 from scalamacros/topic/typetags-local-classesEugene Burmako2012-11-121-1/+1
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | better error when typetagging local classes
| | | * | | | | | better error when typetagging local classesEugene Burmako2012-11-121-1/+1
| | | | |/ / / / | | | |/| | | | | | | | | | | | | | | | | | | | Inspired by https://issues.scala-lang.org/browse/SI-6649
| | * | | | | | Merge pull request #1609 from scalamacros/topic/showraw-nodeprintersEugene Burmako2012-11-121-1/+1
| | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | -Yshow-trees-compact respects other options
| | | * | | | | | -Yshow-trees-compact respects other optionsEugene Burmako2012-11-111-1/+1
| | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aforementioned tree printer now respects other tree printing options such as -uniqid and -Xprint-types. This helps debugging reify, which uses `nodePrinters`, not `showRaw` to print its trees, because back then `showRaw` didn't exist yet.
| | * / / / / / Fix type of the custom `ClassTag` in `PatternMatching.scala`Grzegorz Kossakowski2012-11-091-3/+3
| | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In fb315772 custom ClassTags were introduced to optimize array creation in hot places. The idea was that if `Array[T]` is allocated through `ClassTag[T]` (which is essentially a factory for Array[T]) we would introduce a custom class implementing `ClassTag[T]` interface and would have specialized array allocation instruction instead of having reflective call as it's being done with default (compiler synthesized) implementation of `ClassTag[T]`. In case of `PatternMatching.scala` I made a mistake of providing `ClassTag[Array[Clause]]` instead of `ClassTag[Clause]` so that value would never be used and compiler still would resolve implicit through default mechanism. This has been discovered thanks to @paulp's work on unused value detection. Review by @paulp.
* | | | | | | Merge pull request #1629 from paulp/issue/6355Paul Phillips2012-11-152-1/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Error for SI-6355, overloading of applyDynamic.
| * | | | | | | Error for SI-6355, overloading of applyDynamic.Paul Phillips2012-11-142-1/+10
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As long as it can never be called anyway, seems like we'd be doing people a kindness to fail the compile rather than letting it be ambiguous at every use site.
* | | | | | | Merge pull request #1627 from paulp/issue/6664Paul Phillips2012-11-151-4/+3
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fix for SI-6664, cycle in case classes.
| * | | | | | | Fix for SI-6664, cycle in case classes.Paul Phillips2012-11-141-4/+3
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Scope lookup of an overloaded symbol was accidentally forcing some lazy info. Since as usual the caller didn't even have any interest in the symbol, but only in whether the name existed at all, I changed it call the method I made for this exact purpose, containsName. Also I much reduced the number of checks being made in the quest for an inherited copy method.
* / / / / / / Lower confusion levels in typedApply.Paul Phillips2012-11-141-43/+25
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | It's the usual thing, making logic more logical and removing comments which are incorrect and/or no longer useful.
* | | | | | Merge pull request #1613 from paulp/mutable-settingsPaul Phillips2012-11-132-22/+15
|\ \ \ \ \ \ | | | | | | | | | | | | | | Address obvious bug in MutableSettings.
| * | | | | | Address obvious bug in MutableSettings.Paul Phillips2012-11-132-22/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If x startsWith "-" it seems unlikely that x == "". Free with purchase: test case with 100 argument permutations. That's only a smidgen shy of infinity.
* | | | | | | Merge pull request #1599 from jannic/SI-6637Paul Phillips2012-11-131-11/+11
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | SI-6637
| * | | | | | Fix SI-6637 (misoptimization in erasure)Jan Niehusmann2012-11-091-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the optimization one level deeper so the expression being tested with isInstanceOf is always evaluated.
* | | | | | | Fix merge error.Paul Phillips2012-11-092-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | I fixed that already and somehow it didn't appear in my push.
* | | | | | | Restore briefly awol // 3 in explicitouterPaul Phillips2012-11-091-1/+1
| | | | | | |
* | | | | | | A utility function to summarize an exception.Paul Phillips2012-11-092-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now when I start the repl and trigger an exception during initialization, it offers a one line message like: uncaught exception during compilation: AssertionError("assertion failed: (14,13)") @ scala.reflect.internal.Symbols$Symbol.updateInfo(Symbols.scala:1309) Which is a marked debugging improvement from RC1: uncaught exception during compilation: java.lang.AssertionError
* | | | | | | Cleanups to the previous repl commits.Paul Phillips2012-11-094-116/+96
| | | | | | |
* | | | | | | Moved IMain ops requiring stability into implicit class.Paul Phillips2012-11-092-108/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A long-standing annoyance of having IMain stored in a var is that you can't call a method on it which returns a dependent type and then pass that to any other method. I realized I could get around this by creating an implicit class around the var; in the class, it is a val, so the method can be written there, and we implicitly convert from the var on demand.
* | | | | | | Massively simplified repl name resolution.Paul Phillips2012-11-094-208/+239
| | | | | | |
* | | | | | | Massively simplified repl initialization.Paul Phillips2012-11-092-183/+70
| | | | | | |
* | | | | | | Minor tweaks in Types/Scopes.Paul Phillips2012-11-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All methods to do with handling imports more uniformly and early filtering of symbols which cannot be imported. Also make TypeBounds treat a Wildcard in lower or upper bounds as an empty bound, so we don't see all these method signatures like def f[T >: ? <: ?] because that's not helpful.
* | | | | | | Remove hostile code from explicitouter.Paul Phillips2012-11-081-3/+0
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | If that's the $outer accessor, what's that being created in newOuterAccessor? Sketchy, sketchy business.
* | | | | | Warn about unused imports.Paul Phillips2012-11-072-58/+149
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hidden behind -Xlint as usual. This commit also includes further simplification of the symbol lookup logic which I unearthed on the way to reporting unused imports. Plus unusually comprehensive documentation of same.
* | | | | | A few straggling unused imports.Paul Phillips2012-11-0710-11/+11
| | | | | |
* | | | | | Deprecation patrol.Paul Phillips2012-11-0618-39/+37
| | | | | | | | | | | | | | | | | | | | | | | | Threw in deprecation warning reduction in src/compiler.
* | | | | | Removed unused imports.Paul Phillips2012-11-06174-393/+79
| |_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A dizzying number of unused imports, limited to files in src/compiler. I especially like that the unused import option (not quite ready for checkin itself) finds places where feature implicits have been imported which are no longer necessary, e.g. this commit includes half a dozen removals of "import scala.language.implicitConversions".