summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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 #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 }
| * | | | SI-7007 Test case shows we disallow premature `this` accessJason Zaugg2013-09-112-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than the old behaviour, which compiled successfully but led us into the jaws of a LinkageError. Related to SI-6666.
| * | | | SI-3832 Don't lift methods in aux constructor trailing stats as STATICJason Zaugg2013-09-116-2/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SI-1909 modified LambdaLift to lift in auxiliary constructors methods as STATIC so they could be called before the self-constructor was called. That allowed for: class Foo (x: Int) { def this() = this( { def bar() = 5 bar }) } However, if the method is in a statement that trails the self constructor call, this is unnecessary and in fact incorrect as it robs the lifted method of `this`. This commit uses the machinery established in SI-6666 to limit the STATIC-ness of lifted methods to those used in arguments for self-constructor calls. This is used exclusively; the `isAuxillaryConstructor` check wasn't the right way to solve this, as was seen by the regression it caused in SI-3832. A new test case shows that we can statically lift methods in super-constructor calls, rather than just self-constructor calls. We also have to avoid statically lifting objects in these positions. For now, I just emit a dev warning that a VerifyError is in your future. With some more thought we could escalate that to a implementation restriction and emit an error.
| * | | | SI-3832 Extract tracking of under-construction classes to a mixinJason Zaugg2013-09-112-15/+21
| | | | | | | | | | | | | | | | | | | | In order to reduce the noise in OuterPathTransformer.
| * | | | SI-1909 Move tests from pos to runJason Zaugg2013-09-113-1/+11
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | When we're in the neighbourhood of VerifyErrors, it's better to run the code. This change is leading up to a fix for SI-3832, which regressed with fix for SI-1909.
* | | | Merge pull request #2931 from paulp/pr/TreeDSLJason Zaugg2013-09-1530-340/+343
|\ \ \ \ | | | | | | | | | | Reducing variation of tree creation methods.
| * | | | Reducing variation of tree creation methods.Paul Phillips2013-09-1323-317/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TreeDSL has no future - it was always a temporary measure waiting for something like quasiquotes to come along. In this commit I cull as much of it as I can, especially the delicate matter of creating new DefDefs and ValDefs, which I completely turn over to the old style creators. I unified all the symbol-based DefDef and ValDef creators under a single method, since it was yet another place where ctrl-C and ctrl-V were being punched with glee. Was beaten to the punch on adding copyTypeDef to fill out the *Def creators. Eliminated as many redundant positioning calls as I could find. If you are creating a DefTree tree based on a symbol, it will always have an atPos(sym.pos) { ... } wrapped around it. You don't need another one. All of this is motivated by positions work: positions are assigned in so many places and in such an ad hoc fashion that it is impossible to bring consistency to that without first bringing some consistency to tree creation.
| * | | | Widen type of outer accessor.Paul Phillips2013-09-132-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | This is the key ingredient so TypeTree(sym) can resist widening the type.
| * | | | Corrects behavior of finalResultType.Paul Phillips2013-09-1314-23/+180
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The implementation had come to depend on finalResultType accidentally doing things beyond its charter - in particular, widening types. After hunting down and fixing the call sites depending on the bugs, I was able to rewrite the method to do only what it's supposed to do. I threw in a different way of writing it entirely to suggest how some correctness might be obtained in the future. It's a lot harder for a method written like this to break.
* | | | Merge pull request #2945 from som-snytt/test/jsr223-serviceJason Zaugg2013-09-153-2/+13
|\ \ \ \ | | | | | | | | | | SI-7843 Restore JSR 223 service entry
| * | | | SI-7843 Restore JSR 223 service entrySom Snytt2013-09-143-2/+13
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 2.10 fix to remove the ScriptEngine service entry was inadvertently forwarded to 2.11. This commit reverts and adds a test. This situation was entirely foreseen by retronym, proving beyond doubt that he is in fact a time traveler, as hinted by his name. He brings bugs forward into the future and returns into the past with fixes and other alien technology like scalaz.
* | | | Merge pull request #2936 from paulp/pr/one-team-one-positionPaul Phillips2013-09-142-295/+206
|\ \ \ \ | |_|_|/ |/| | | Consolidate Position classes.
| * | | Removed deprecated calls.Paul Phillips2013-09-121-92/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And changed the implementation internal traits to private[util] rather than sealed because that's closer to the point. I would make them "private" except that this incurs "private type escapes scope" errors where private[util] does not. Also improved file organization.
| * | | Consolidate Position classes.Paul Phillips2013-09-122-302/+210
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having now been burned several times thinking I had a chunk of positions under my belt only to find my pants had vanished when I forged ahead, I am carving out some intermediate stages for positions. This one only reshuffles the internals. It consolidates almost all the behavior into one class, leaving little stub subclasses to mimic the classes which came before - since nothing is final or has access anything less than public, there's no way to touch any constructor without breakage, so they all have to stay. I removed redundant/incorrect documentation and rewrote the rest of it, although I don't expect the lifespan of any of it to be enormous. The overall thinking behind the existing design was a bit elusive. Concrete exception-throwing implementations were provided in the base class for every method, with less exceptional overrides defined in selected subclasses. If you're going to define every method in the base class, concretely no less, then there is little advantage and lots of disadvantage to spreading out over a bunch of subclasses. Note that now Position contains no state and has no constructor, characteristics which behoove its possibly distant ambition toward AnyValhood. Though that does ignore the "api" class it inherits which brims with implementation detail, api.Position. It is a burden which will likely prove heavy.
* | | Merge pull request #2943 from som-snytt/issue/7839-phase-ass-chkinitGrzegorz Kossakowski2013-09-131-1/+1
|\ \ \ | |/ / |/| | SI-7839 Final val breaks checkinit build
| * | SI-7839 Final val breaks checkinit buildSom Snytt2013-09-131-1/+1
|/ / | | | | | | | | | | | | | | | | Scalac does not care to initialize the unused field it emits for a `final val`. Users of the accessor method, which supplies the constant definition inline, will find that -Xcheckinit will throw. Therefore, we don't use `final` for the `val phaseName`.
* | Merge pull request #2859 from som-snytt/issue/7622-phaserGrzegorz Kossakowski2013-09-1252-264/+549
|\ \ | | | | | | SI-7622 Clean Up Phase Assembly
| * | Todo promote to partestSom Snytt2013-09-111-0/+1
| | |
| * | SI-7622 Scaladoc and error message polishSom Snytt2013-08-214-3/+12
| | | | | | | | | | | | Restores the verbiage "run right after".
| * | SI-7622 Clean Up Phase AssemblySom Snytt2013-08-2141-55/+277
| | | | | | | | | | | | | | | | | | | | | | | | Let optimiser components and continuations plugin opt-out when required flags are not set. Wasted time on a whitespace error in check file, so let --debug dump the processed check file and its diff.
| * | SI-7622 Plugins can be not enabledSom Snytt2013-08-214-27/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | Plugins can interrogate options and declare themselves not enabled. The plugin itself can return false from its init if the options do not compute. A plugin phase component can declare itself not enabled, same as an internal phase. No one exploits this facility at this commit.
| * | SI-7622 -Xshow-phases can show disabled phasesSom Snytt2013-08-211-36/+38
| | | | | | | | | | | | | | | | | | | | | With -Ydebug, -Xshow-phases will show phases that are skipped or not enabled. The code is slightly refactored, so the flags table will also benefit.
| * | SI-7622 Phases are enabled or notSom Snytt2013-08-219-74/+133
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactor the calculation of the "phase chain" a bit. In particular, initial and terminal phases are not special except that they must be head and last. When done, filter for enabled phases. At this commit, nobody claims to be disabled. Additional sanity support of phases settings.
| * | SI-7622 -Xgenerate-phase-graph is an info optionSom Snytt2013-08-212-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | -Xgenerate-phase-graph is comparable to -Xshow-phases. The knowledge about what is an info-only option is refactored to Settings, which also knows which group of options comprise the optimiser set.
| * | SI-7622 Phase assembly is testableSom Snytt2013-08-213-59/+37
| | | | | | | | | | | | | | | | | | | | | | | | Fixing hash on nodes makes fault detection deterministic, which aids testing. Error messages are shortened and .dot files are dumped automatically on faults to guard against future flakiness.
* | | Merge pull request #2928 from retronym/merge/2.10.x-to-masterGrzegorz Kossakowski2013-09-1216-178/+302
|\ \ \ | | | | | | | | merge 2.10.x to master