summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* SI-7501 Pickler: owner adjustment for param syms in annotation argsJason Zaugg2013-08-174-1/+30
| | | | | | | | | | | | | | | | Pickling of trees within annotation arguments led to an unfortunate situation: the MethodType of a symbol contained a value parameter symbol that was pickled as though it were owned by the enclosing class (the root symbol of the pickle.) Under separate compilation, this would appear as a member of that class. Anyone using `@deprecatedName('oldName)` was exposed to this problem, as the argument expands to `Symbol.apply("oldName")`. This commit extends some similar treatment of local type parameters to also consider value parameters.
* Merge pull request #2845 from soc/SI-7704-reduxAdriaan Moors2013-08-161-1/+1
|\ | | | | SI-7704 Fix partest's test category selection (again)
| * SI-7704 Fix partest's test category selection (again)Simon Ochsenreither2013-08-161-1/+1
|/ | | | | Looks like multiple, different fixes for this issue managed to break it again.
* Merge pull request #2843 from xeno-by/topic/kill-introduce-top-levelAdriaan Moors2013-08-1623-358/+3
|\ | | | | kills introduceTopLevel
| * kills introduceTopLevelEugene Burmako2013-08-1623-358/+3
| | | | | | | | | | | | | | | | | | | | | | As we've figured out from the practice, introduceTopLevel is seductively useful but unfortunately not robust, potentially bringing compilation order problems. Therefore, as discussed, I'm removing it from the public macro API. Alternatives are either: 1) delving into internals, or 2) using macro paradise and experimenting with macro annotations: http://docs.scala-lang.org/overviews/macros/annotations.html.
* | Merge pull request #2841 from gourlaysama/wip/t6507Adriaan Moors2013-08-164-3/+45
|\ \ | | | | | | SI-6507 do not call .toString on REPL results when :silent is on.
| * | SI-6507 do not call .toString on REPL results when :silent is on.Antoine Gourlay2013-08-164-3/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Member handlers used to always call .toString on REPL results, even when :silent was on, which could force evaluation or cause unwanted side effects. This forwards the current value of `printResults` to the member handlers (through Request) for them to decide what to do when the results must not be printed. 2 handlers now do not return any extraction code when silent: - ValHandler, so that it doesn't call toString on the val - Assign, so that it doesn't call toString on the right-hand side of the assignement.
* | | Merge pull request #2837 from soc/SI-7630Adriaan Moors2013-08-161-4/+9
|\ \ \ | | | | | | | | SI-7630 [Avian] Skip test run/repl-javap-outdir-funs on Avian
| * | | SI-7630 [Avian] Skip test run/repl-javap-outdir-funs on AvianSimon Ochsenreither2013-08-161-4/+9
| | |/ | |/| | | | | | | | | | | | | | | | | | | The test fails, because the REPL command reports that no anonfuns were found. I have spent a considerable amount of time to figure out what's the issue here with no success. Skip it for now, so that we don't lose sight of the big picture.
* | | Merge pull request #2836 from soc/SI-7564-reduxAdriaan Moors2013-08-161-18/+18
|\ \ \ | | | | | | | | SI-7564 [Avian] Whitespace fixes to run/tailcalls.check
| * | | SI-7564 [Avian] Whitespace fixes to run/tailcalls.checkSimon Ochsenreither2013-08-161-18/+18
| | |/ | |/| | | | | | | | | | Looks like the differences in the whitespace caused the test to fail on Avian.
* | | Merge pull request #2777 from soc/SI-7681-dead-code-daemonthreadfactoryAdriaan Moors2013-08-163-77/+35
|\ \ \ | | | | | | | | SI-7681 Remove DaemonThreadFactory, clean up IMain
| * | | Clean up imports in s.t.n.interpreter.IMainSimon Ochsenreither2013-08-151-38/+33
| | | |
| * | | SI-7681 Remove scala.tools.nsc.io.DaemonThreadFactorySimon Ochsenreither2013-08-153-40/+3
| |/ /
* | | Merge pull request #2830 from densh/topic/stats-parsing-2Adriaan Moors2013-08-1626-143/+368
|\ \ \ | | | | | | | | updated SI-7331, SI-6843, SI-7731, parser entry point refactoring, assertThrows utility function
| * | | addresses feedback regarding new junit testsDen Shabalin2013-08-154-21/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. don't recreate symbol table manually and just let JUnit do it automatically behind the scenes 2. minor changes to assertThrow's description 3. add one more test case to check that exception's subclasses are catched too 4. refine rethrow test to ensure that the exception wasn't swallowed
| * | | SI-6843 well-positioned syntax errors for quasiquotesDen Shabalin2013-08-147-56/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is achieved in a following way: 1. Similarly to toolbox quasiquotes can go away with wrapping for parsing purpose after introduction of `parseStats` and `parseRule` entry points. 2. In case of syntax error quasiquote computes equivalent corresponding position in the source code with the help of `corrrespondingPosition` mapper which relies on position data collected into `posMap` during code generation.
| * | | SI-7331 remove all the wrapping code from toolboxDen Shabalin2013-08-147-7/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change toolbox parsing to use `parseStats` parser entry point instead of current code-wrappign technique that makes positions much less useful to end users. There is also no need to create a compiler `Run` for parsing.
| * | | refactor repl to use new new parser entry pointDen Shabalin2013-08-146-42/+36
| | | | | | | | | | | | | | | | | | | | | | | | This commit refactors repl to use `parseStats` entry point and streamlines hacky error handling that was previously used to encode errors that happen during parsing.
| * | | refactor parser entry points and extract a few methods outDen Shabalin2013-08-143-32/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains three logical changes: 1. Split `templateStatSeq` into two methods as we need more reliable parsing of template body alone for new `parseStats` entry point. 2. Add new parser entry point called `parseStats` which is aimed towards use in tools that require parsing of Scala code that can be written inside of a template. Such functionality is required for parsing lines in repl, parsing code through toolbox, parsing and running scala scripts and lastly for quasiquotes. All of them are refactored to use this very method in the next commits. A new method called `templateStatsCompat` is also added to make this commit pass the tests but it's a temporary hack that will be removed in next commit in favor of `parseStats`. 3. Extract out a few methods like `isCaseDefStart`, `expectedMsgTemplate` and `parseRule`. These are needed to override parser behaviour in updated quasiquotes parser (see next commits).
| * | | SI-7731 make CannotHaveAttrs more consistentDen Shabalin2013-08-142-4/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously setPos, pos_=, setType, tpe_= all behaved inconsistently between each other even though they all represent similar attributes that cannot be changed on CannotHaveAttrs trees. In order to simplify handling of such trees in compiler code each of these fields now supports assignment to its current default value: NoType for tpe and NoPosition for pos. Such assignments don't mutate underlying trees.
| * | | add assertThrows testing utility functionDen Shabalin2013-08-142-0/+44
| |/ / | | | | | | | | | This is much easier to use than built-in JUnit method-level checks.
* | | Merge pull request #2823 from som-snytt/issue/7715Adriaan Moors2013-08-166-42/+125
|\ \ \ | | | | | | | | SI-7715 String inpatternation s"$_" for s"${_}"
| * | | SI-7715 String inpatternation s"$_" for s"${_}"Som Snytt2013-08-126-42/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a pattern, ``` scala> implicit class RX(val sc: StringContext) { | def rx = sc.parts.mkString("(.+)").r } defined class RX scala> "2 by 4" match { case rx"$a by $_" => a } res0: String = 2 scala> val rx"$_ by $b" = "2 by 4" b: String = 4 ```
* | | | Merge pull request #2821 from xeno-by/topic/fundep-materializationAdriaan Moors2013-08-168-14/+160
|\ \ \ \ | | | | | | | | | | SI-7470 implements fundep materialization
| * | | | SI-7470 implements fundep materializationEugene Burmako2013-08-138-14/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fix provides implicit macros with an ability to affect type inference in a more or less sane manner. That's crucial for materialization of multi-parametric type class instances (e.g. Iso's from shapeless). Details of the technique can be found in comments.
* | | | | Merge pull request #2803 from adriaanm/rebase-2728Adriaan Moors2013-08-161-18/+16
|\ \ \ \ \ | | | | | | | | | | | | SI-7658 Prevent StackOverflowError in ScalaRunTime.stringOf
| * | | | | Remove unused private[scala] def ScalaRunTime.checkZipSimon Ochsenreither2013-08-081-14/+0
| | | | | |
| * | | | | SI-7658 Prevent StackOverflowError in ScalaRunTime.stringOfSimon Ochsenreither2013-08-081-4/+16
| | |/ / / | |/| | |
* | | | | Merge pull request #2785 from soc/SI-7704Adriaan Moors2013-08-167-36/+30
|\ \ \ \ \ | | | | | | | | | | | | SI-7704 Fix partest's test category selection
| * | | | | Clean up ConsoleRunner, --> returns Boolean ...Simon Ochsenreither2013-07-303-14/+9
| | | | | | | | | | | | | | | | | | | | | | | | ... not Unit now.
| * | | | | Add some explicit return types to s.t.c._Simon Ochsenreither2013-07-304-16/+15
| | | | | |
| * | | | | SI-7704 Fix partest's test category selectionSimon Ochsenreither2013-07-303-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | My recent changes to command line parsing in 6090709 broke partest's functionality of picking test categories (e. g. --pos or --run). The breakage was caused because scala.tools.cmd._ stored the command line options with the `--` prefix, but TestKinds.standardKinds did not.
* | | | | | Merge pull request #2798 from som-snytt/issue/7544-errmsgAdriaan Moors2013-08-168-13/+11
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | SI-7544 Interpolation message for %% literal
| * | | | | StringContext#checkLengths reports bad args countSom Snytt2013-08-062-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since interpolator args are of type Any, it's easy to write s(args) instead of s(args: _*). I wonder if Xlint would have warned me about that.
| * | | | | In tests, interpolation is no longer -Xperimental.Som Snytt2013-08-064-4/+0
| | | | | |
| * | | | | SI-7544 Interpolation message for %% literalSom Snytt2013-08-062-6/+7
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new error text: "conversions must follow a splice; use %% for literal %, %n for newline". The error is emitted when % is not at the start of a part; only the non-conversions %% and %n are allowed. It would be nice if it were convenient to parse the part to see what the user may have intended, but c'est l'erreur.
* | | | | Merge pull request #2831 from soc/SI-7624Grzegorz Kossakowski2013-08-1593-2610/+1346
|\ \ \ \ \ | | | | | | | | | | | | SI-7624 Fix -feature and some -Xlint warnings
| * | | | | Whitespace fixes in scala/tools/scalapSimon Ochsenreither2013-08-1531-294/+293
| | | | | |
| * | | | | SI-7624 Fix -feature warnings in scala/tools/scalapSimon Ochsenreither2013-08-1525-174/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ... and move scalap.scala.tools.scalap.scalax.rules to scalap.scala.tools.scalap.rules now that all the Monad/Functor/ Applicatve/... stuff has been removed.
| * | | | | SI-7624 Replace new{Term,Type}Name with {Term,Type}NameSimon Ochsenreither2013-08-153-11/+11
| | | | | |
| * | | | | SI-7624 Fix a few remaining -Xlint warnings ...Simon Ochsenreither2013-08-1525-70/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in various places. This includes actors, compiler (mostly some new macro parts) continuations, partest, scaladoc, scalap.
| * | | | | SI-7624 Fix -Xlint warnings in AnyVal-related codeSimon Ochsenreither2013-08-1511-1771/+629
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The changes are actually pretty small: scala.language.implicitConversions is moved around so that it is only emitted to the source file if there is an actual implicit conversion. The rest of the diff are mostly the new generated source files reflecting that change.
| * | | | | Formatting fixes for AnyValSimon Ochsenreither2013-08-151-59/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The files are not regenerated here, because additional fixes will follow in the next commit.
| * | | | | SI-7624 Fix -feature warnings and build with -featureSimon Ochsenreither2013-08-1510-20/+24
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I added a language.existential import to LazyCombiner.scala which should not be necessary, but causes a spurious warning otherwise: scala/src/library/scala/collection/parallel/mutable/LazyCombiner.scala:33: warning: the existential type scala.collection.parallel.mutable.LazyCombiner[_$1,_$2,_$3] forSome { type _$1; type _$2; type _$3 <: scala.collection.generic.Growable[_$1] with scala.collection.generic.Sizing }, which cannot be expressed by wildcards, should be enabled by making the implicit value scala.language.existentials visible. if (other.isInstanceOf[LazyCombiner[_, _, _]]) { ^ I created ticket SI-7750 to track this issue.
* | | | | Merge pull request #2792 from ScrapCodes/partest-script-fixedAdriaan Moors2013-08-151-1/+4
|\ \ \ \ \ | | | | | | | | | | | | Bug fix ! , if $color_opts is unset partest script does not work.
| * | | | | Added a warning from scala runner script.Prashant Sharma2013-08-131-0/+3
| | | | | |
| * | | | | Bug fix ! , if $color_opts is unset partest script does not work.Prashant Sharma2013-08-011-1/+1
| | | | | |
* | | | | | Merge pull request #2819 from som-snytt/issue/regextract-charAdriaan Moors2013-08-142-0/+96
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7737 Regex matches Char
| * | | | | | SI-7737 Regex matches CharSom Snytt2013-08-102-0/+96
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables Char extraction by regex. ``` val r = """(\p{Lower})""".r "cat"(0) match { case r(x) => true } val nc = """\p{Lower}""".r "cat"(0) match { case nc() => true } ```