summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Fix for overly suppressive repl.Paul Phillips2012-02-124-8/+10
| | | | | | | | | At some point in the past, trying to prevent deprection warnings from being issue in triplicate in the repl, I suppressed too much output, leading to a class of breakdowns where the failure would be swallowed completely. This went on for far too long. The deprecation warnings are back in triplicate for the moment, but the repl should now be less "strong, silent type" and more emo.
* Fixed bug in DefDef creation.Paul Phillips2012-02-111-1/+1
| | | | | | | | | | | | What's improbable about 29f933b60 is that a good chunk of the commit exists only so you can pass "mods" to the DefDef constructor. And then the body isn't updated to use it, the parameter dies on the vine. That was five years ago. I logged when mods didn't match Modifiers(sym.flags) and there were a bunch of differences, but I didn't see any interesting behavior emerging. Still, I bet something changed somewhere (hopefully in the fixy direction.)
* Another existential problem down.Paul Phillips2012-02-1110-110/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a window of danger when multiple related elements are being typed where something which is conceptually one thing can slip into two things, and those two things can be incompatible with one another. Less mysteriously, c478eb770d fixed this: def f = { object Bob ; Bob } ; val g = f But, it did not fix this: def f = { case class Bob() ; Bob } ; val g = f See test case pos/existentials-harmful.scala for an "in the wild" code example fixed by this commit. The root of the problem was that the getter and the field would each independently derive the same existential type to describe Bob, but those existentials were not the same as one another. This has been the most elusive bug I have ever fixed. I want to cry when I think of how much time I've put into it over the past half decade or so. Unfortunately the way the repl works it is particularly good at eliciting those grotesque found/required error messages and so I was never able to let the thing go. There is still a cosmetic issue (from the last commit really) where compound types wind up with repeated parents. Closes SI-1195, SI-1201.
* Overcame long-maddening existential issue.Paul Phillips2012-02-105-2/+138
| | | | | | | | | | | | | | | | | When performing an existential transform, the bounds produced by the hidden symbols may contain references to the hidden symbols, but these references were not accounted for. This was at the root of some bad behavior with existentials. If you've ever seen a message like this: <console>:8: error: type mismatch; found : B(in value res0) where type B(in value res0) <: A with ScalaObject required: B(in value res0) forSome { type B(in value res0) <: A with ScalaObject; type A <: Object with ScalaObject } ...then you know what I mean. Closes SI-4171, not quite yet on SI-1195, SI-1201.
* Failing tests for pending.Paul Phillips2012-02-103-0/+43
|
* Merge remote-tracking branch 'scalamacros/pullrequest/5451' into developPaul Phillips2012-02-092-12/+14
|\
| * Fixes https://issues.scala-lang.org/browse/SI-5451Eugene Burmako2012-02-092-12/+14
| | | | | | | | | | | | | | | | | | | | Macro implementations now get type arguments as TypeTrees, not Types. Keeping the situation with AnnotationInfos in mind, I decided to go for the most future-proof solution. Another argument for this decision is that we will most likely have to support untyped macros. Review by @odersky.
* | Added back `internal.Symbol.toplevelSymbol` to resurrect the IDE for trunk.Iulian Dragos2012-02-091-0/+4
|/
*---. Merge remote-tracking branches 'VladUreche/issue/5287-cleanup', ↵Paul Phillips2012-02-083-34/+13
|\ \ \ | | | | | | | | | | | | 'scalamacros/pullrequest/removecodedotscala' and 'scalamacros/pullrequest/macrodoc' into develop
| | | * Updated information about desugaring of macrosEugene Burmako2012-02-081-7/+11
| | | |
| | * | Removed Code.scalaEugene Burmako2012-02-081-25/+0
| | |/ | | | | | | | | | | | | | | | | | | | | | This is a logical next step after deprecating and removing LiftCode: https://github.com/scala/scala/commit/ffc2389840852a120fecd772206d55db9a79f30e Now when Paul has uploaded a starr that doesn't need Code, Code$ and Code.lift we can finally remove the last remaining pieces of the old reification logic.
| * / Fixed misplaced @usecase annotationVlad Ureche2012-02-081-2/+2
| |/ | | | | | | That was preventing the compiler API scaladoc from building
* | Merge remote-tracking branch 'lrytz/maven-version-fix'Paul Phillips2012-02-083-5/+6
|\ \
| * | fix maven publish version numbersLukas Rytz2012-02-073-5/+6
| |/
* | Merge branch 'base-2.8.x-2.9.x-2.10.x'Paul Phillips2012-02-081-1/+4
|\ \ | |/ |/|
| * Remove alphanumeric characters from the major part of the Scala version number.Iulian Dragos2012-02-081-1/+4
| | | | | | | | | | | | In practice, this removes the 'v' in v2.10.0-M1-0168-g99844ebc10-2012-02-08. Why is this important, you ask? Many tools assume the version number to be composed of 3 numbers and a string qualifier. Eclipse is one of the tools that validates version numbers, and this string is used to stamp Scala IDE builds against Scala nightlies.
* | new starr based on v2.10.0-M1-167-g0ccd295a78Paul Phillips2012-02-063-3/+3
| |
* | Added a rootdoc page for the compiler API scaladocVlad Ureche2012-02-064-5/+10
| |
* | Scaladoc @usecase annotation overriding / SI-5287Vlad Ureche2012-02-064-36/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From now on, the usecases inherit the comments from their parents, such as the explanation and the annotations: @param, @tparam, @return, etc. An example of usecase comment inheritance is: /** * The test function tests the parameter param for ... * * @param theParam the implicit parameter to be tested for ... * @return the result of the test * * * * @usecase def test(): Bool * * The test function tests the parameter taken implicitly from scope. * Example: `test()` * * @return the result of the test for the current scope * * * * @usecase def test(theParam: SomeType): Bool * * This takes the explicit value passed. * Example: `test(3)` * * @param theParam the explicit parameter to be tested for ... */ def test(implicit theParam: SomeType): Bool Notice both usecases override the explanation with their own examples. The first usecase also overrides the "@return" annotation while the 2nd usecase overrides the "@param theParam" annotation. If they didn't override the explanations and annotations, they would inherit the values from the actual implementation, def test(implicit ...) This will be followed by @inheritdoc, which enables more fine-grained control over comment inheritance. The full explanation of using comment inheritance and @inheritdoc and their interaction with variables is given at https://wiki.scala-lang.org/display/SW/Tags+and+Annotations in the "Comment inheritance" and "Inheritance Example" sections.
| |
| \
| \
| \
| \
| \
*-----. \ Merge remote-tracking branches 'rklaehn/SI-5139', 'axel22/feature/pc-ctrie', ↵Paul Phillips2012-02-06118-1095/+3475
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | 'greedy/auto-fetch-jars', 'scalamacros/pullrequest/assorted' and 'VladUreche/feature/scaladoc-nofail' into develop
| | | | * | Added the "nofail" flag to the scaladoc ant taskVlad Ureche2012-02-061-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To use it, we need to update starr and then add nofail="yes" to the build.xml scaladoc tasks.
| | | * | | Assorted fixesEugene Burmako2012-02-068-62/+85
| | | |/ / | | | | | | | | | | | | | | | | | | | | Multiple fixes that have been accumulated during my investigations of 5273. Too heterogeneous to describe here, too minor to split into changesets.
| | * / / Automatically fetch jars as neededGeoff Reedy2012-02-061-14/+19
| | |/ / | | | | | | | | | | | | | | | | Use mappers with uptodate and touch tasks to detect if any jars need to be downloaded based on the modification time of the desired.sha1 files
| * | | Merge branch 'master' into feature/pc-ctrieAleksandar Prokopec2012-02-06209-1557/+2395
| |\| |
| | * | Revert "Added a rootdoc page for the compiler API scaladoc"Paul Phillips2012-02-054-10/+5
| | | | | | | | | | | | | | | | This reverts commit e34098b7f6e37420198fa5c7c2820d0443b46cc4.
| | * | Revert "Scaladoc @usecase annotation overriding / SI-5287"Paul Phillips2012-02-054-277/+36
| | | | | | | | | | | | | | | | This reverts commit 7946ac410ad74894cd0eb6dfd29447f173911b99.
| | * | Refining the reflection api.Paul Phillips2012-02-0528-193/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the pursuit of simplicity and consistency. - Method names like getType, getClass, and getValue are far too ambiguous, both internally and especially with java reflection names. Methods which accept or return scala symbols should not refer to them as "classes" in the reflection library. (We can live with the FooClass convention for naming the well-known symbols, it's names like "getClass" and "classToType" which are needlessly conflationary.) - Meaningless names like "subst" have to be expanded. - We should hew closely to the terms which are used by scala programmers wherever possible, thus using "thisType" to mean "C.this" can only beget confusion, given that "thisType" doesn't mean "this.type" but what is normally called the "self type." - It's either "enclosing" or "encl", not both, and similar consistency issues. - Eliminated getAnnotations. - Removed what I could get away with from the API; would like to push those which are presently justified as being "required for LiftCode" out of the core. - Changed a number of AnyRefs to Any both on general principles and because before long it may actually matter. - There are !!!s scattered all over this commit, mostly where I think the name could be better. - I think we should standardize on method names like "vmSignature, vmClass" etc. when we are talking about jvm (and ostensibly other vm) things. There are a bunch more places to make this distinction clear (e.g. Symbol's javaBinaryName, etc.) - There is a lot more I want to do on this and I don't know where the time will come from to do it. Review by @odersky, @scalamacros.
| | * | Reimplemented Modifer.Paul Phillips2012-02-058-44/+94
| | | | | | | | | | | | | | | | | | | | Couldn't live with a scala.Enumeration being a permanent fixture in the reflection library. Rolled it by hand.
| | | |
| | | \
| | | \
| | | \
| | | \
| | | \
| | *-----. \ Merge remote-tracking branches 'VladUreche/feature/compiler-rootdoc', ↵Paul Phillips2012-02-0518-48/+317
| | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 'scalamacros/pullrequest/5334', 'scalamacros/pullrequest/5272' and 'VladUreche/issue/5287-cleanup' into develop
| | | | | | * | Scaladoc @usecase annotation overriding / SI-5287Vlad Ureche2012-02-054-36/+277
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From now on, the usecases inherit the comments from their parents, such as the explanation and the annotations: @param, @tparam, @return, etc. An example of usecase comment inheritance is: /** * The test function tests the parameter param for ... * * @param theParam the implicit parameter to be tested for ... * @return the result of the test * * * * @usecase def test(): Bool * * The test function tests the parameter taken implicitly from scope. * Example: `test()` * * @return the result of the test for the current scope * * * * @usecase def test(theParam: SomeType): Bool * * This takes the explicit value passed. * Example: `test(3)` * * @param theParam the explicit parameter to be tested for ... */ def test(implicit theParam: SomeType): Bool Notice both usecases override the explanation with their own examples. The first usecase also overrides the "@return" annotation while the 2nd usecase overrides the "@param theParam" annotation. If they didn't override the explanations and annotations, they would inherit the values from the actual implementation, def test(implicit ...) This will be followed by @inheritdoc, which enables more fine-grained control over comment inheritance. The full explanation of using comment inheritance and @inheritdoc and their interaction with variables is given at https://wiki.scala-lang.org/display/SW/Tags+and+Annotations in the "Comment inheritance" and "Inheritance Example" sections.
| | | | | * | | Fixes https://issues.scala-lang.org/browse/SI-5272Eugene Burmako2012-02-056-3/+20
| | | | | | | |
| | | | * | | | Fixes https://issues.scala-lang.org/browse/SI-5334Eugene Burmako2012-02-054-4/+10
| | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New version of reification isn't susceptible to this bug. The problem was with Code.lift generating not only a tree, but also a manifest with the type of that tree. That led to an issue in the case of the type of the manifest depending on a class declared inside the quasiquote. Now manifests in reification are gone, so is the problem.
| | | * | / / Added a rootdoc page for the compiler API scaladocVlad Ureche2012-02-054-5/+10
| | | | |/ / | | | |/| |
| | * | | | Merge remote-tracking branch 'szabolcsberecz/small-cleanup' into developPaul Phillips2012-02-052-3/+2
| | |\ \ \ \
| | | * | | | one less TODO and null checkSzabolcs Berecz2012-02-052-3/+2
| | | | | | |
| | * | | | | Merge remote-tracking branches 'scalamacros/pullrequest/cygwinscripts' and ↵Paul Phillips2012-02-0544-433/+278
| | |\ \ \ \ \ | | | | |_|/ / | | | |/| | | | | | | | | | 'scalamacros/pullrequest/removeliftcode' into develop
| | | * | | | Replaced LiftCode with a function in MacroContextEugene Burmako2012-02-0544-433/+278
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Major cleanup of reification: * LiftCode phase has been removed * Code has been deprecated and will be removed as we roll a new starr * Logic related to type-directed lifting has been purged scala.reflect.macro.Context#reify now provides the same services as LiftCode provided (except that it returns Tree, not Code). For testing purposes, I've retained the oh-so-convenient automagic lift. test/files/codelib/code.jar now hosts Code.lift reimplemented in a macro, so that the tests can continue working as if nothing has happened.
| | * | | | Fixes OSTYPE check for CygwinEugene Burmako2012-02-051-1/+1
| | | | | |
| | * | | | Fixes curlUpload for CygwinEugene Burmako2012-02-051-0/+1
| | |/ / /
| * | | | Add tests for parallel Ctrie.Aleksandar Prokopec2012-02-037-17/+126
| | | | | | | | | | | | | | | | | | | | Changed parameters in some tests to speed them up.
| * | | | Fix some issues in parallel Ctrie.Aleksandar Prokopec2012-02-036-46/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change resolves some issues with ParCtrie splitters and their `remaining` method, which currently evaluates the size of the Ctrie. Since this is still not done lazily, nor in parallel, it has a certain cost, which is unacceptable. Change #1: The `shouldSplitFurther` method is by default implemented by calling the `remaining` method. This method now forwards the call to the same method in the splitter which is by default implemented in the same way as before, but can be overridden by custom collections such as the ParCtrie. Change #2: ParCtrie splitter now has a `level` member which just counts how many times the method has been split. This information is used to override the default `shouldSplitFurther` implementation. Change #3: The tasks and splitters rely heavily on the `remaining` method in the splitter for most operations. There is an additional method called `isRemainingCheap` which returns true by default, but can be overridden by custom collections such as the `Ctrie`.
| * | | | Add parallel Ctrie parallel collection.Aleksandar Prokopec2012-02-025-10/+151
| | | | |
| * | | | Incorporate Ctrie into standard library.Aleksandar Prokopec2012-02-024-13/+106
| | | | | | | | | | | | | | | | | | | | Implemented Ctrie serialization. Improved hashcode computation.
| * | | | Add the Ctrie concurrent map implementation.Aleksandar Prokopec2012-02-0113-0/+2055
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ctrie is a scalable concurrent map implementation that supports constant time lock-free lazy snapshots. Due to the well-known private volatile field problem, atomic reference updaters cannot be used efficiently in Scala yet. For this reason, 4 java files had to be included as well. None of these pollute the namespace, as most of the classes are private. Unit tests and a scalacheck check is also included.
| * | | | Remove ParIterator and SignalContextPassingIterator.Aleksandar Prokopec2012-02-0114-182/+113
| | | | | | | | | | | | | | | | | | | | | | | | | This unclutters the namespace and makes defining custom parallel collections a lot easier.
| * | | | Add support for combiner sharing to parallel collections.Aleksandar Prokopec2012-02-014-119/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Concurrent (thread-safe) collections can implement builders directly for parallel collections by having themselves as builders, similar to buffers being builders for themselves in sequential collections. Combining 2 shared combiners can be expensive (more than logn), but is never done, since `combine` is always called with `this` (receiver) combiner, so `combine` just returns `this`. This commit adds support for implementing a parallel collection by having itself as combiner (parallel builder). To do this, clients must now merely implement their combiners by overriding the method `canBeShared` and having it return `true`. The support is implemented by refining the abstraction which creates combiners in tasks - this abstraction is provided by the protected `combinerFactory` method, previously `cbfactory`. The essential difference is that if the combiner can be shared, this method returns a combiner factory which always returns the same combiner. Otherwise, it always creates a new combiner. Span and takeWhile had to be modified for shared combiners to make this work, but for all other collections they work as before. Several other tasks had to be modified slightly, as well.
* | | | | added reference equality checks to improve structural sharingRuediger Klaehn2012-02-051-7/+12
| |/ / / |/| | | | | | | | | | | | | | | added reference equality checks to updated0 and removed0 to prevent creation of a new map when updating an entry with the same value or removing an entry that was not present to begin with.
* | | | Merge branch 'fix-script'Paul Phillips2012-02-041-13/+18
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | Conflicts: tools/get-scala-revision
| * | | Establish more baseline tags.Paul Phillips2012-02-041-13/+18
| | | | | | | | | | | | | | | | So we can turn out a build string regardless of local conditions.
| * | | Time-traveled get-scala-revision to 3-way merge base.Paul Phillips2012-02-041-16/+28
| | | |