summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* | | Merge pull request #2955 from retronym/ticket/7853Paul Phillips2013-09-187-11/+64
|\ \ \ | |/ / |/| | SI-7853 Regression in explicit outer
| * | SI-7853 A less ad-hoc place to call memberTypeJason Zaugg2013-09-184-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than localizing the fix to the outerAccessor, this commit pushed the call to `memberType` into *all* usages of `newValDef` and `newDefDef`. The TPT of `applyOrElse` in synthetized partial functions must be set explicitly to pass the pos/t7853-partial-function.scala. Otherwise, the as-seen-from ends up cloning the type parameter `B1` of `applyOrElse` as it transforms (questionably) its bound from `List[Int @unchecked]` to `List[Int]`. Partial Function synthesis was already a delicate area, and this makes things more explicit which could be counted as an improvement.
| * | SI-7853 An unsatisfying fix regression in explicit outerJason Zaugg2013-09-184-7/+50
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The attempt to placate pos/t4970.scala in 55c6fd4 roused another dragon. We've got two levers here: the type of the symbol of the outer accessor, and the type of its DefDef. They have been historically out of sync due to the vaguaries of finalResultType (which is far less vague since 671e6e03c7), but the finicky operation of ExplicitOuter now has a hard time when we try to bring them into line. This stuff is notoriously difficult to understand because the trees you see from `-Xprint` show a tpt derived from the method symbol's info, and discards the actual tpt in the tree. Rather than letting `DefDef(acc)` call `TypeTree(sym)` and use `sym.tpe_*.finalResultType`, this commit computes the member type of the accessor from the current class and explicitly uses that as the return type of the outer accessor def. We should try to push this a little deeper. I tried to put it into `def TypeTree`, but that broke, among others, run/concurrent-stream.scala. Maybe `def DefDef` and `def ValDef`? But a localised fix is the right start as it addresses the regression in a minimal fashion to get the IDE building again.
* | Merge pull request #2958 from paulp/pr/longer-timeoutPaul Phillips2013-09-171-1/+1
|\ \ | | | | | | Longer timeout for repl test.
| * | Longer timeout for repl test.Paul Phillips2013-09-171-1/+1
|/ / | | | | | | | | 15 seconds is crazy aggressive. I have fast hardware and it's still really easy for a test to take to fifteen seconds under load.
* | Merge pull request #2942 from retronym/topic/build-number-mavenGrzegorz Kossakowski2013-09-172-4/+1
|\ \ | | | | | | Remove build.number.maven
| * | Remove build.number.mavenJason Zaugg2013-09-132-4/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I can't find any justification for having this information in both build.number and build.number.maven. They have drifted apart on the 2.10.x branch, although that doesn't matter because build.number is correct, and loaded first, and Ant properties are write-once. I'm assuming that the Ant tasks in src/build/pack.xml are only invoked through the <antcall>-s in ./build.xml. Here's a test of that from the 2.10.x branch: % cat build.number #Tue Sep 11 19:21:09 CEST 2007 version.major=2 version.minor=10 version.patch=3 # This is the -N part of a version. if it's 0, it's dropped from maven versions. version.bnum=0 # Note: To build a release run ant with -Dbuild.release=true # To build an RC, run ant with -Dmaven.version.suffix=-RCN % cat build.number.maven version.major=2 version.minor=10 version.patch=0 % git diff diff --git a/build.xml b/build.xml index 3a83aa4..5cb952c 100644 --- a/build.xml +++ b/build.xml @@ -62,6 +62,9 @@ TODO: <target name="distpack" depends="dist.done, docs.done"> <ant antfile="${src.dir}/build/pack.xml" target="pack-all.done" inheritall="yes" inh + <target name="distpack.maven.info"> + <ant antfile="${src.dir}/build/pack.xml" target="pack-maven.info" inheritall="yes" i + <target name="distpack-maven" depends="dist.done, docs.done"> <ant antfile="${src.dir}/build/pack.xml" target="pack-maven.done" inheritall="yes" i diff --git a/src/build/pack.xml b/src/build/pack.xml index 20c4034..56863ff 100644 --- a/src/build/pack.xml +++ b/src/build/pack.xml @@ -133,6 +133,10 @@ MAIN DISTRIBUTION PACKAGING <mkdir dir="${dists.dir}/maven/${version.number}"/> </target> + <target name="pack-maven.info"> + <echo message="version.patch = ${version.patch}"/> + </target> + <target name="pack-maven.libs" depends="pack-maven.start"> <macrodef name="mvn-copy-lib"> <attribute name="mvn.artifact.name"/> % ant distpack.maven.info Buildfile: /Users/jason/code/scala2/build.xml distpack.maven.info: pack-maven.info: [echo] version.patch = 3 Notice how the stale `version.patch=0` in build.number.maven is ignored.
* | | Merge pull request #2951 from retronym/ticket/7847Grzegorz Kossakowski2013-09-174-7/+18
|\ \ \ | | | | | | | | SI-7847 Static forwarders for case apply/unapply
| * | | SI-7847 Static forwarders for case apply/unapplyJason Zaugg2013-09-164-7/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These were excluded in f901816b3f because at the time they were compiler fiction and translated to calls to the case class constructor or accessors. But since they are now bona-fide methods (albeit still occasionally bypassed as an optimization), we can expose them conveniently to our Java brethren. The cut-and-pastiness of GenBCode starts to hinder maintenance. Here's a report of further duplication that we have to fix up post haste: https://gist.github.com/retronym/6334389
* | | | Merge pull request #2950 from retronym/ticket/7841Grzegorz Kossakowski2013-09-178-20/+91
|\ \ \ \ | |_|_|/ |/| | | Damage control related to AnyRef specialization
| * | | SI-7841 More robust unspecialization of namesJason Zaugg2013-09-163-14/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Names like `T1$sp`, which can arise from `AnyRef` specialization, were leading to negative length Names if they ever passed through `unspecializedName` or `splitSpecializedName`. This code path was touched when printing the tree of a certain AnyRef specialized classes after specialization, such as `AbstractPartialFunction` (which had such specialization until a few commits ago.) This commit handles that case correctly, and generally hardens against unexpected names, which could pop up from third party classes. The documentation for `splitSpecializedName` transposed the class and method specializations. The things you discover when you turn examples in documentation in to test cases! In addition, we now require non-negative length and offset in `newTermName`
| * | | SI-7841 Remove AnyRef specialization from AbstractPartialFunctionJason Zaugg2013-09-161-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was missed in cc3badae1 Compatibility classes for formerly specialized variants used by Scalacheck have been added as a stopgap measure until we publish the next milestone.
| * | | SI-7841 Remove commented out AnyRef specialization from Function{0,1}.Jason Zaugg2013-09-154-5/+5
| |/ / | | | | | | | | | In a sign of decreased optimism about that facility.
* | | Merge pull request #2935 from densh/topic/si-7304-6489-6701Jason Zaugg2013-09-1626-113/+232
|\ \ \ | | | | | | | | SI-6701, SI-7304, SI-6489, variable arity definitions refactoring
| * | | refactor variable arity definitionsDen Shabalin2013-09-125-46/+47
| | | | | | | | | | | | | | | | | | | | | | | | Transform current arrays of symbols into function-like objects that return NoSymbol at all places where corresponding arity isn't available.
| * | | SI-6489 parsing in macros should provide proper positionsDen Shabalin2013-09-1216-54/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. macro parsing doesn't use toolbox any more but calls parser directly 2. in order for this to work parser has to be refactored to limit usage of currentUnit and rewire it into parser's local unit method which might use currentUnit for some parsers but will user proper unit for UnitParser 3. similar change has to be done to make compilation unit's reporter overridable
| * | | SI-7304 improve deprecation warnings for tree factory methodsDen Shabalin2013-09-114-13/+68
| | | |
| * | | SI-6701 add SYNTHETIC flag to the reflection apiDen Shabalin2013-09-112-0/+4
| | | |
* | | | Merge pull request #2948 from retronym/ticket/7845Jason Zaugg2013-09-162-0/+8
|\ \ \ \ | |_|/ / |/| | | SI-7845 Disable test for JSR 233
| * | | SI-7845 Disable test for JSR 233Jason Zaugg2013-09-162-0/+8
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For Paul, it steals focus when it runs. For me, it fails with some platform specific extra output: -ScriptEngineManager providers.next(): javax.script.ScriptEngineFactory: Provider apple.applescript.AppleScriptEngineFactory could not be instantiated: java.lang.UnsatisfiedLinkError: no AppleScriptEngine in java.library.path n: Object = 10 12345678910 So off to the holding pen for now.
* | | Merge pull request #2946 from jinfu-leng/ticket/7844Jason Zaugg2013-09-151-1/+1
|\ \ \ | | | | | | | | SI-7844 Intellij setup.sh is not working for Ubuntu 12.04
| * | | SI-7844 Intellij setup.sh is not working for Ubuntu 12.04jinfu-leng2013-09-151-1/+1
| | | | | | | | | | | | | | | | Added "-f" option to the command "rm"
* | | | Merge pull request #2884 from retronym/ticket/3832Jason Zaugg2013-09-1516-19/+119
|\ \ \ \ | | | | | | | | | | SI-1909 SI-3832 SI-7007 SI-7223 Improved handling of larval objects
| * | | | SI-7223 More finesse in setting INCONSTRUCTORJason Zaugg2013-09-123-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's a clunky flag used to determine very early on whether we're in the self-call, super-call or early-init section. In SI-6666 / fd6125428, the check was improved to consider nesting. But, that caused this regression, as Function's haven't been translated to classes yet, so our check for enclosing non-term owners failed wrongly flagged definitins body of a anonymous function as INCONSTRUCTOR. With this patch, we correctly flag: class C extends D { // INCONSTRUCTOR () => { !INCONSTRUCTOR } // INCONSTRUCTOR }