summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* SI-7876 Scaladoc crasher due to regression in isFunctionType.Jason Zaugg2013-09-264-2/+48
| | | | | | | | | | | `isFunctionType` and `isTupleType` started returing true for type constructors as of aeb73314. This led to a crash in type printing in ScalaDoc (specfically, in ModelFactoryTypeSupport.scala) This commit: - fixes those methods by guarding with !isHigherKinded - unit tests said methods - tests the reported crasher with a ScalaDoc test.
* Merge pull request #2982 from retronym/topic/checkinitAdriaan Moors2013-09-243-0/+9
|\ | | | | SI-4742 Make -Xcheckinit aware of constants.
| * SI-4742 Make -Xcheckinit aware of constants.Jason Zaugg2013-09-243-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Members defined as `final val x = <literal>` are given a ConstantType. The constant is folded into the accessor method `x`, and the field itself is never initialized. (Related discussion: SI-4605) As such, -Xcheckinit spuriously warns when calling that accessor. This commit disables the checks for constants. This will also fix the checkinit build (failure tracked as SI-7839), which is the victim of this a spurious scolding.
* | Merge pull request #2980 from huitseeker/revert-2957Jason Zaugg2013-09-2461-530/+482
|\ \ | |/ |/| Revert #2957
| * Add position check for regression introduced by #2957François Garillot2013-09-242-0/+56
| | | | | | | | | | | | | | | | The starting bound for ValDefs in #2957 is distinct from the expected result, e.g. [4:9]val x = [8:9]0 instead of [0:9]val x = [8:9]0
| * Revert "Merge pull request #2957 from paulp/pr/parser-improvements"François Garillot2013-09-2459-530/+426
| | | | | | | | | | This reverts commit 884e1ce762d98b29594146d37b85384581d9ba96, reversing changes made to f6fcc4431f272c707d49de68add532c452dd4b0f.
* | Merge pull request #2975 from retronym/ticket/7868Jason Zaugg2013-09-235-4/+43
|\ \ | |/ |/| SI-7868 Account for numeric widening in match translation
| * SI-7868 Account for numeric widening in match translationJason Zaugg2013-09-235-4/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pattern match translation was unprepared for trees of the shape: (0: Short) match { case A.unapply(<unapply-selector>.toInt) <unapply> (_) => () case _ => () } While a scrutinee is inelibigle for implicit views in order to conform to the type of the extractor call, it is allowed to weakly conform. In this case, the typechecker will add the numeric widening with a `toInt` call. This commit: - Changes treeInfo.Unapplied to recognize this tree shape - Changes spliceApply to recognize and preserve the widening when substituting the unapply selector with the binder - Tests reification of such pattern matches, which also depends on treeInfo.Unapplied.
* | Merge pull request #2938 from Ichoran/issue/7725Jason Zaugg2013-09-231-3/+26
|\ \ | | | | | | SI-7725 - Vector concatenation is unreasonably slow
| * | SI-7725 - Vector concatenation is unreasonably slowRex Kerr2013-09-201-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | Rewrote ++ to use append or prepend when adding small collections to the end or beginning of vectors. This solves the extra-O(n) problem for addition of single elements reported in SI_7725. Renamed LgConcatFaster to Log2ConcatFaster (more widely recognizable).
* | | Merge pull request #2972 from adriaanm/versions-m5Jason Zaugg2013-09-231-5/+5
|\ \ \ | | | | | | | | Upgrade: starr=M5, partest=RC5, xml=RC4, parsers=RC2.
| * | | Upgrade: starr=M5, partest=RC5, xml=RC4, parsers=RC2.Adriaan Moors2013-09-191-5/+5
| |/ /
* | | Merge pull request #2956 from som-snytt/issue/7848-forgotten-interp-msgJason Zaugg2013-09-236-11/+92
|\ \ \ | | | | | | | | SI-7848 Xlint says what looks interpolated
| * | | SI-7848 Xlint no warn on $sym with paramsSom Snytt2013-09-183-14/+66
| | | | | | | | | | | | | | | | This idea brought to you by retronym.
| * | | SI-7855 No missing interpolator warning post-typerSom Snytt2013-09-182-5/+2
| | | | | | | | | | | | | | | | Avoid extra work, extra warnings.
| * | | SI-7848 Xlint says what looks interpolatedSom Snytt2013-09-175-9/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The motivating use case was an Expecty debug string getting flagged for `$eq`. The test case demonstrates a different bug, in which the position of the literal tree is changed when typer gets rid of the unused local, so that when the tree is re-typed in erasure, a second, spurious warning is emitted at the start of the method. Specifically, the second warning is not suppressed because of the different position.
* | | | Merge pull request #2953 from jiaweihli/masterJason Zaugg2013-09-231-1/+1
|\ \ \ \ | | | | | | | | | | Fix typo in documentation.
| * | | | Fix typo in documentation.Jiawei Li2013-09-161-1/+1
| |/ / /
* | | | Merge pull request #2962 from densh/topic/syntactic-assignJason Zaugg2013-09-2310-15/+77
|\ \ \ \ | | | | | | | | | | Quasiquotes: add syntactic extractor for assignment-like trees
| * | | | add syntactic extractor for assignment-like treesDen Shabalin2013-09-1810-15/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are three kinds of assign-like trees: 1. Assign(lhs, rhs) // $lhs = $rhs 3. AssignOrNamedArg(lhs, rhs) // $lhs = $rhs 2. Apply(Select(f, nme.update), args :+ rhs) // $f(..$args) = $rhs New syntactic combinator unifies all of them and lets users not to think about these implementations details.
* | | | | Merge pull request #2968 from huitseeker/interrupt-koshernessJason Zaugg2013-09-231-2/+8
|\ \ \ \ \ | | | | | | | | | | | | Follow good interrupt discipline in Response
| * | | | | Follow good interrupt discipline in ResponseFrançois Garillot2013-09-201-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Restores the interrupted status of the waiting thread after catching an InterruptException.
* | | | | | Merge pull request #2974 from retronym/ticket/7864Jason Zaugg2013-09-233-1/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | SI-7864 Harden "looks like an interpolated String" warning
| * | | | | | SI-7864 Harden "looks like an interpolated String" warningJason Zaugg2013-09-223-1/+7
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | We can't rely on the qualifier of an `Apply` having a non-null symbol in general.
* | | | | | Merge pull request #2954 from retronym/ticket/7852Jason Zaugg2013-09-234-0/+59
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Avoid null checks when emitting "".== and SomeModule.==
| * | | | | SI-7852 Refactor null-elision tests to be more focussedJason Zaugg2013-09-182-49/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Directly count null checks, rather than diffing the textual bytecode of the entire method - Add a test to show that the LHS needs to be a direct module reference, not just a tree with a module type, to elide the null check.
| * | | | | SI-7852 Omit null check for SomeModule.==Jason Zaugg2013-09-182-19/+12
| | | | | | | | | | | | | | | | | | | | | | | | For the same reasons outlined in the previous commits.
| * | | | | SI-7852 Test to show status quo of for SomeModule.==Jason Zaugg2013-09-172-7/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For which we can also elide the null check, and will in the next commit.
| * | | | | SI-7852 Omit null check for "".==Jason Zaugg2013-09-172-17/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Although the same the code would be later optimized by -Yconst-opt, we can offer the same lean byte code to those compiling without that option by being more discerning when translating ==. This helps people using bytecode based code coverage tools such as jacoco that would emit "branch not covered" warnings for the impossible null check.
| * | | | | SI-7852 Test to show the status quo bytecode for "" == ...Jason Zaugg2013-09-173-0/+51
| | |_|/ / | |/| | | | | | | | | | | | | Will be somewhat leaner after the next commit.
* | | | | Merge pull request #2949 from retronym/topic/future-from-tryJason Zaugg2013-09-222-2/+16
|\ \ \ \ \ | | | | | | | | | | | | Convenience methods from Try[T] => {Future, Promise}[T]
| * | | | | Convenience methods from Try[T] => {Future, Promise}[T]Jason Zaugg2013-09-192-2/+16
| | |_|_|/ | |/| | |
* | | | | Merge pull request #2964 from retronym/topic/ant-18Jason Zaugg2013-09-211-0/+5
|\ \ \ \ \ | | | | | | | | | | | | Require Ant >= 1.8.2
| * | | | | Require Ant >= 1.8.2Jason Zaugg2013-09-191-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reportedly our build fails with Ant earlier incarnations. Time to raise the bar. Tested by temporarily setting the requirement to 1.8.5 and observing: % ant init Buildfile: /Users/jason/code/scala/build.xml desired.jars.uptodate: boot: init: BUILD FAILED /Users/jason/code/scala/build.xml:216: Ant version 1.8.5 is required. You are running Apache Ant(TM) version 1.8.4 compiled on May 22 2012
* | | | | | Merge pull request #2970 from dragos/improvement/source-osgi-headersJason Zaugg2013-09-211-7/+47
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix SI-7862: MANIFEST.MF file for Scala sources
| * | | | | | SI-7862: MANIFEST.MF file for Scala sourcesIulian Dragos2013-09-201-7/+47
| | |/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to be able to use published Scala jars as OSGi bundles in the Eclipse build, Eclipse needs to match sources and binaries. That is done by making source jars *source bundles*. This PR adds the required manifest entries. Nothing else should be affected (file names remain the same).
* | | | | | Merge pull request #2967 from densh/topic/si-6719Jason Zaugg2013-09-212-0/+9
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Add test case for SI-6719
| * | | | | add test case for SI-6719Den Shabalin2013-09-202-0/+9
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | The bug itself was fixed earlier in 95fe19545d60ae9aa79d2c8d5665c7f3b0cbdb1a It was caused by improper wrapping of blocks in the toolbox's parse method.
* | | | | Merge pull request #2957 from paulp/pr/parser-improvementsJason Zaugg2013-09-1959-426/+530
|\ \ \ \ \ | | | | | | | | | | | | Parser and position improvements.
| * | | | | SI-7854, SI-6768 better parsing/positioning in parserPaul Phillips2013-09-1852-414/+464
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parser hole I found while working on the generated positions serves as the umbrella for a host of improvements. Upgraded positions assigned during some specific challenging situations mostly involving the creation of synthetic trees, e.g. for comprehensions and closures. While doing so improved some error messages. Eliminated some of the most glaring duplication in the parser. It's written like there is some payoff associated with being spectacularly imperative. Not so far.
| * | | | | Position#show prints the point.Paul Phillips2013-09-1813-36/+90
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Can't ensure range position points are meaningful when we never see them. To limit noise, only print the point when it != start. [x:y] // point=x, start=x, end=y [p/x:y] // point=p, start=x, end=y I'm open to a different syntax. Also prints NoPosition as [X] rather than [NoPosition] because noise is for construction workers and attenders of rock concerts. Some range position and parser tests are included so we can see the checkfile change when the forthcoming fix happens (either an error message improvement or a positional one.)
* | | | | Merge pull request #2941 from huitseeker/less-destructive-docComments-resetJason Zaugg2013-09-193-3/+27
|\ \ \ \ \ | |/ / / / |/| | | | Cautiously give PC more control over docComments table
| * | | | Add trait keeping comments across new Typer runsFrançois Garillot2013-09-192-1/+19
| | | | |
| * | | | Uses a WeakHashMap to constrain memory footprint of docCommentsFrançois Garillot2013-09-191-2/+8
|/ / / /
* | | | Merge pull request #2959 from paulp/pr/basic-type-housekeepingPaul Phillips2013-09-1817-85/+89
|\ \ \ \ | | | | | | | | | | Type housekeeping.
| * | | | Type housekeeping.Paul Phillips2013-09-1818-87/+91
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moved ListOfNil somewhere more generally accessible. No reason the compiler should hoard it for itself. Flitted to a few locations with constructs like ".head.head" and ".tail.head" looking for code which could be rewritten. Found some, admittedly not always making use of ListOfNil. Made overdue moves of ConstantType(Constant(true|false|null)) to vals in Definitions.
* | | | Merge pull request #2961 from paulp/pr/whitespaceJason Zaugg2013-09-181056-4234/+3594
|\ \ \ \ | | | | | | | | | | Cull extraneous whitespace.
| * | | | Cull extraneous whitespace.Paul Phillips2013-09-181056-4234/+3594
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in.
* | | | | Merge pull request #2960 from paulp/noisy-test-3960Jason Zaugg2013-09-181-2/+2
|\ \ \ \ \ | |_|/ / / |/| | | | Silence pos/t3960's -Ycheck output.
| * | | | Silence pos/t3960's -Ycheck output.Paul Phillips2013-09-171-2/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Someday someone will have to straighten out where output goes. Clearly under current conditions, Console.err is not a good place. I rerouted through unit.warning so the output will be swallowed like all the other warnings.