summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
* Unfinalize the class DefaultPromiseJason Zaugg2015-08-131-6/+8
| | | | | | | | | | | | | | | | | It was non-final in Scala 2.11.x, and made final as part of fa0743c32. Removing the final modifier seems like the cleanest way to enable conversions like `javaFuture.toScala.toJava` to return the original `javaFuture` in scala-java8-compat. I have made the methods defined in this class final as an alternative lockdown. Discussion, Motivation: https://github.com/scala/scala-java8-compat/pull/46 https://github.com/scala/scala-java8-compat/pull/50
* Merge pull request #4608 from ruippeixotog/improve-mutable-treesetSeth Tisue2015-08-064-54/+182
|\ | | | | SI-6938 Use mutable red-black tree in `mutable.TreeSet`
| * SI-6938 Use mutable red-black tree in TreeSetRui Gonçalves2015-07-284-54/+182
| | | | | | | | | | | | | | | | The previous implementation of `mutable.TreeSet` uses a mutable reference to an immutable red-black tree as its underlying data structure. That leads to unnecessary objects being created, which can be a problem in systems with limited resources. It also has reduced performance when compared with common mutable implementations. In this commit `mutable.TreeSet` is changed so that it uses the recently created `mutable.RedBlackTree` as its underlying data structure. Specialized red-black tree methods were created for working with keys for efficiency reasons. The new implementation is source-compatible with the previous one, although its serialized representation obviously changes. Closes [SI-6938](https://issues.scala-lang.org/browse/SI-6938).
* | Merge pull request #4648 from Ichoran/issue/8554-againSeth Tisue2015-08-063-12/+19
|\ \ | | | | | | SI-8554 Two-arg remove now throws exception on overly-large count
| * | SI-8554 Two-arg remove throws exception on large countRex Kerr2015-07-193-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | ListBuffer now throws exceptions like other buffers do when trying to index out of range. Also harmonized the order of testing (`count < 0` tested before `n` in range). Test in scala-collection-laws (gated by SI8554 flag). Also modified test in run/t6634.scala
* | | Merge pull request #4677 from qilab-/ticket-9426Seth Tisue2015-08-061-6/+6
|\ \ \ | | | | | | | | SI-9426 Rename the argument f of LinearSeqOptimized.foldLeft/foldRight to op
| * | | add @deprecatedNameqilab gamma2015-08-041-3/+3
| | | |
| * | | rename argument f of LinearSeqOptimized.reduceLeft to op in accordance with ↵qilab gamma2015-08-021-2/+2
| | | | | | | | | | | | | | | | scaladoc
| * | | rename argument f of LinearSeqOptimized.foldLeft/foldRight to op in ↵qilab gamma2015-08-021-4/+4
| | | | | | | | | | | | | | | | accordance with scaladoc
* | | | Merge branch '2.11.x' into 2.12.xAdriaan Moors2015-08-058-44/+16
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Transcript: ``` ➜ scala git:(2.12.x) export MB=$(git merge-base 2.12.x 2.11.x) ➜ scala git:(2.12.x) echo $MB 0e9525aa618a2eca143a1c7379ff1e6efd23b86e ➜ scala git:(2.12.x) g log --oneline --graph $MB...2.11.x ``` Read this upside down :-). The last merge comes first, with merge commands interspersed in the git log. ``` ➜ scala git:(2.12.x) g merge 2.11.x Auto-merging versions.properties Auto-merging src/reflect/scala/reflect/internal/pickling/UnPickler.scala Auto-merging src/reflect/scala/reflect/internal/Types.scala Auto-merging src/reflect/scala/reflect/internal/TreeGen.scala Auto-merging src/library/scala/collection/immutable/Stream.scala Auto-merging src/library/scala/collection/convert/Wrappers.scala Auto-merging build.xml CONFLICT (content): Merge conflict in build.xml Auto-merging README.md Automatic merge failed; fix conflicts and then commit the result. ``` ``` * 928e6892d4 (scala/2.11.x, 2.11.x) Merge pull request #4682 from adriaanm/jline-quick.bin |\ | * b763dbf368 (adriaanm/jline-quick.bin, jline-quick.bin) Include jline on quick.bin tool path * | ccded7d179 Merge pull request #4680 from janekdb/2.11.x-option |\ \ | |/ |/| | * 58ae3e51f7 Delegate null test to Option |/ * a745f06e35 Merge pull request #4670 from retronym/ticket/9422 |\ | * ec95e534a2 SI-9422 Fix incorrect constant propagation * 65fa73dff3 Merge pull request #4669 from janekdb/2.11.x-scaladoc-reflect |\ | * e206a1837d ScalaDoc fixes for reflect * | 8e7e3b4a5f Merge pull request #4667 from janekdb/2.11.x-scaladoc-library-library-aux |\ \ | |/ |/| | * 69c2c106fe ScalaDoc fixes for library and library-aux * | 7de4cbc5e5 Merge pull request #4665 from lrytz/asm-504-3 |\ \ | * | cdc55c29d0 Upgrade scala-asm to 5.0.4-scala-3 |/ / * | d8da39a197 Merge pull request #4661 from retronym/ticket/9365 |\ \ | * | 0c99742c51 SI-9365 Don't null out dependencies of transient lazy vals | / * | 2279d3f3d9 Merge pull request #4662 from janekdb/2.11.x-redundant-val-modifier |\ \ | * | 173a6fad95 Remove redundant 'val' from case class params. * | | e0d21432d6 Merge pull request #4664 from SethTisue/remove-dead-link-in-readme |\ \ \ | |_|/ |/| | | * | 600fc4e6e1 fix readme for death of typesafe.artifactoryonline.com | |/ * | 7492bda816 Merge pull request #4636 from SethTisue/contributor-stuff-from-github-wiki |\ \ | |/ |/| | * ed5098dbc4 merge two reviewers lists in readme | * e136e4ad47 tighten up CONTRIBUTING.md a little | * f9ca6863d4 readme/contributor's guide tweaks | * 80e98b03a1 tiny readme fix | * 197845620c merge in text from pull request policy from old wiki | * e93ca409ae drop in pull request policy from old wiki | * 951939d1b3 contributor guide: add a morsel salvaged from GitHub wiki * f682441f6f Merge pull request #4653 from lrytz/t9403 |\ | * 2678d349b2 SI-9403 fix ICodeReader for negative BIPUSH / SIPUSH values ``` ``` ➜ scala git:(2.12.x) g merge -s ours f2d7838d90 Merge made by the 'ours' strategy. ``` ``` * f2d7838d90 Merge pull request #4657 from lrytz/backports |\ | * 241bb9ac19 Rename the ENUM / DEFAULTMETHOD flags to include JAVA_ | * 7a7f9927c3 SI-9393 fix modifiers of ClassBTypes for Java annotations | * 8946d60bd2 [backport] Fix bytecode stability when running the closure optimizer | * 3b6b2bfe9f [backport] SI-9392 Clarify the workaround comment and introduce a devWarning | * 091c1e6ed8 [backport] SI-9392 Avoid crash in GenBCode for incoherent trees | * 6177cb4481 [backport] SI-9393 Temporarily disable two assertions in GenBCode | * a1d471f7ba [backport] Refactor the ClosureOptimizer, run ProdCons only once per method | * f5e72765f2 [backport] SI-9387 Fix VerifyError introduced by indylambda | * 41b99e2531 [backport] Integrate the LMFInvokeDynamic extractor into LambdaMetaFactoryCall | * fc1cda2118 [backport] Small refactoring to the closure optimizer | * 8f272c0ad2 [backport] Accessibility checks for methods with an InvokeDynamic instruction | * 1c1d8259b5 [backport] Fix bytecode stability | * ef9d845676 [backport] Support methodHandle / invokeDynamic constant pool entries in scalap | * 60747c7555 [backport] Skip mirror class when invoking deserializeLambda | * 404e86239e [backport] Prevent infinite recursion in ProdConsAnalyzer | * 1b0703e74d [backport] SI-9376 don't crash when inlining a closure body that throws. | * e511375a90 [backport] Fix superclass for Java interface symbols created in JavaMirrors | * 1b57723169 [backport] `deserializeLambda` should not use encoded class name | * 8bafa8ed88 [backport] Java parser: default methods in interfaces are not `DEFERRED` | * 44e2761a9b [backport] SI-6613 fixed in GenBCode ``` ``` ➜ scala git:(2.12.x) g merge 4c6dcfe934 Auto-merging src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala Auto-merging doc/License.rtf Auto-merging doc/LICENSE.md Auto-merging build.xml Auto-merging build.sbt Merge made by the 'recursive' strategy. Auto packing the repository in background for optimum performance. See "git help gc" for manual housekeeping. build.sbt | 2 +- build.xml | 2 +- doc/LICENSE.md | 4 ++-- doc/License.rtf | 4 ++-- src/scaladoc/scala/tools/nsc/doc/html/page/Template.scala | 2 +- src/scalap/decoder.properties | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) ``` ``` * | 4c6dcfe934 Merge pull request #4656 from lrytz/filtersOpenJDK |\ \ | |/ |/| | * 0b35bc29aa Ignore OpenJDK warnings in partest filters * 6eb0812050 Merge pull request #4644 from SethTisue/copyright-2015 * e0aac7c9ef bump copyright year to 2015 ```
| * | | Delegate null test to OptionJanek Bogucki2015-08-042-37/+9
| | | | | | | | | | | | | | | | | | | | Option(null) is None while Option(v) is Some(v) which makes the null test redundant.
| * | | ScalaDoc fixes for library and library-auxJanek Bogucki2015-07-286-7/+7
| | | |
* | | | Merge pull request #4649 from janekdb/2.12.x-noTraceSuppressionJason Zaugg2015-07-272-3/+5
|\ \ \ \ | |_|/ / |/| | | Align noTraceSuppression val names to system property name
| * | | Align noTraceSuppression val names to system property nameJanek Bogucki2015-07-202-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For vals based on the scala.control.noTraceSuppression system property align the val name to the property name. Deprecate the existing val.
* | | | Merge pull request #4647 from Ichoran/issue/8911Lukas Rytz2015-07-231-4/+5
|\ \ \ \ | | | | | | | | | | SI-8911 allow serializing Scala Maps wrapped as Java ones
| * | | | SI-8911 scala.collection.convert.Wrappers$MapWrapper not serializableRex Kerr2015-07-191-4/+5
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | Added `with Serializable` to `MapWrapper` and `SetWrapper`. Test verifies that serialization works in the simplest case. Also updated tests in t8549 to check that serialization works and doesn't change.
* | | | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-07-231-1/+1
|\ \ \ \ | | |_|/ | |/| | | | | | merge/2.11.x-to-2.12.x-20152307
| * | | SI-9406 fix doc for Range.takeRightSeth Tisue2015-07-181-1/+1
| | | |
* | | | remove legacy bincompat stuff in Predef.scala, Stream.scalaSeth Tisue2015-07-212-22/+0
| |_|/ |/| | | | | | | | | | | | | | | | | | | | it was only there to preserve binary compatibility within the 2.11.x series includes updated partest, since the old partest ran afoul of the Stream change
* | | Remove our fork of forkjoin. Java 8 bundles it.Adriaan Moors2015-07-157-7/+104
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provide deprecated compatibility stubs for the types and static members, which forward as follows: ``` scala.concurrent.forkjoin.ForkJoinPool => java.util.concurrent.ForkJoinPool scala.concurrent.forkjoin.ForkJoinTask => java.util.concurrent.ForkJoinTask scala.concurrent.forkjoin.ForkJoinWorkerThread => java.util.concurrent.ForkJoinWorkerThread scala.concurrent.forkjoin.LinkedTransferQueue => java.util.concurrent.LinkedTransferQueue scala.concurrent.forkjoin.RecursiveAction => java.util.concurrent.RecursiveAction scala.concurrent.forkjoin.RecursiveTask => java.util.concurrent.RecursiveTask scala.concurrent.forkjoin.ThreadLocalRandom => java.util.concurrent.ThreadLocalRandom ``` To prepare for Java 9, the Scala library does not itself use `sun.misc.Unsafe`. However, for now, it provide a convenience accessor for it via `scala.concurrent.util.Unsafe`. This (deprecated) class will be removed as soon as the eco-system drops its use (akka-actor, I'm looking at you).
* | Merge remote-tracking branch 'origin/2.11.x' into ↵Jason Zaugg2015-07-135-5/+14
|\| | | | | | | | | | | | | | | | | | | | | | | | | merge/2.11.x-to-2.12.x-20150713 Conflicts: src/eclipse/partest/.classpath src/eclipse/repl/.classpath test/files/run/nothingTypeNoFramesNoDce.scala test/files/run/repl-javap-app.check Also fixup two .classpath files with updated partest, xml and parser combinators JARs.
| * Merge pull request #4596 from janekdb/2.11.x-typos-p-rSeth Tisue2015-07-011-1/+1
| |\ | | | | | | Fix 27 typos (p-r)
| | * Fix 27 typos (p-r)Janek Bogucki2015-06-301-1/+1
| | |
| * | Merge pull request #4576 from som-snytt/issue/9206-moreSeth Tisue2015-07-012-0/+5
| |\ \ | | |/ | |/| SI-9206 REPL custom bits
| | * SI-9206: REPL custom welcome messageSom Snytt2015-06-232-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Can be specified by `-Dscala.repl.welcome=Greeting` or in properties file. It takes the same format arguments as the prompt, viz, version, Java version and JVM name. It can be disabled by `-Dscala.repl.welcome` with no text.
| * | SI-8140 Documentation references java.lang.String directlyvsalvis2015-06-292-4/+8
| | |
* | | [ SI-7514 ] Introduce Source.fromClassPath(resource) methodEugene Dzhurinsky2015-07-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Creates Source from named classpath resource. Simplifies val src = io.Source.fromInputStream(classOf[ClassInst].getResourceAsStream("/name")) to val src = io.Source.fromClassPath("/name")
* | | Include sources for scala-java8-compat instead of jarLukas Rytz2015-07-01135-0/+3120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e1895d64f87dc3c699a3ccbc8a3143b18d3b5bb1, titled "Add scala-java8-compat to scala-library.jar". Move SAM functions and `LambdaDeserializer` (from scala/scala-java8-compat@9253ed9) into `scala.runtime.java8` package under `src/library`. (The package name is the only diff -- they were in `scala.compat.java8` before). The original LambdaDeserializer: https://github.com/scala/scala-java8-compat/blob/c0732e6/src/main/java/scala/compat/java8/runtime/LambdaDeserializer.scala
* | | Fix size update on `mutable.TreeMap#clear()`Rui Gonçalves2015-06-262-2/+4
| | | | | | | | | | | | | | | | | | The previous implementation has a major bug - although `clear()` sets the root node to `null`, the `size` attribute of the `Tree` was not updated. This effectively meant that even after a `map.clear()`, a call to `map.size` would still yield the old size of the map. The scalacheck test suite was updated to contemplate this issue.
* | | Merge pull request #4504 from ruippeixotog/mutable-treemapAdriaan Moors2015-06-254-0/+792
|\ \ \ | | | | | | | | SI-4147 Add an implementation of `mutable.TreeMap`
| * | | SI-4147 Add an implementation of `mutable.TreeMap`Rui Gonçalves2015-05-304-0/+792
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit contains an implementation of a mutable red-black tree with focus on performance. It also contains a new `mutable.TreeMap` Scala collection that is backed by the aforementioned tree. The common generic factories and traits related to mutable sorted maps didn't exist yet, so this commit also adds them. Regarding performance, `TreeMap` overrides (from `MapLike` and `SortedMapLike`) all of the most common methods for maps and also those whose default implementations are asymptotically worse than direct red-black tree algorithms (e.g. `last`, `clear`). The `rangeImpl` method of `TreeMap` returns an instance of `TreeMapView`, an inner class of `TreeMap`. This view is backed by the same `RedBlackTree.Tree` instance, and therefore changes to the original map are reflected in the view and vice-versa. The semantics of mutating a view by adding and removing keys outside the view's range are the same of the current `mutable.TreeSet`. A bit less focus was given on the performance of views - in particular, getting the `size` of a `TreeMapView` is O(n) on the number of elements inside the view bounds. That can be improved in the future. In a future commit, `mutable.TreeSet` can be changed to be backed by this red-black tree implementation.
* | | | Merge pull request #4514 from martijnhoekstra/patch-2Adriaan Moors2015-06-251-29/+58
|\ \ \ \ | | | | | | | | | | Documentation for split [ci: last-only]
| * | | | StringLike.split fixed for surrogates and docmartijnhoekstra2015-05-281-29/+58
| |/ / / | | | | | | | | | | | | | | | | | | | | Reverts to calling String.split(re: String), but change escape to always put us on the JDK7 fast-path if possible, which is for everything but Chars representing surrogate codeunits
* | | | Merge branch '2.11.x' into merge/2.11.x-to-2.12.x-20150624Jason Zaugg2015-06-2416-542/+295
|\ \ \ \ | |/ / / |/| / / | |/ /
| * | Merge pull request #4574 from janekdb/2.11.x-typos-g-iJason Zaugg2015-06-231-1/+1
| |\ \ | | |/ | |/| Fix 25 typos (g-i)
| | * Fix 25 typos (g-i)Janek Bogucki2015-06-221-1/+1
| | |
| * | Merge pull request #4564 from som-snytt/issue/promptv2.11.7Adriaan Moors2015-06-221-3/+4
| |\ \ | | |/ | |/| SI-9206 Fix REPL code indentation
| | * SI-9206 BooleanProp if set and not untrueSom Snytt2015-06-181-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, handy `sys.BooleanProp.keyExists` ignored the property value. While trying not to make any real estate puns, this commit will let it go false if a value is supplied that is not true in the usual Java sense. But what is truth? Allows `scala -Dscala.color=off`, for example.
| * | Fix 36 typos (d-f)Janek Bogucki2015-06-211-1/+1
| | |
| * | Merge pull request #4331 from Ichoran/issue/8930Adriaan Moors2015-06-191-5/+12
| |\ \ | | |/ | |/| SI-8930 - Vector updated, +:, and :+ slow when typed as Seq[A]
| | * SI-8930 - Vector updated, +:, and :+ slow when typed as Seq[A]Rex Kerr2015-06-181-5/+12
| | | | | | | | | | | | | | | | | | Vector was intercepting only the IndexedSeq CanBuildFrom to quickly generate new vectors. Now it intercepts immutable.Seq and collection.Seq as well. There are other possibilities (collection.IndexedSeq), but they will probably arise rarely, and to avoid an absurdly long set of checks we would need a marker trait (that is not binary compatible).
| * | Merge pull request #4539 from vsalvis/vsalvis-docfixesSeth Tisue2015-06-184-22/+7
| |\ \ | | | | | | | | Doc fixes
| | * | SI-8543 doc: Move TODO out of NumericRange's scaladocvsalvis2015-06-171-4/+4
| | | |
| | * | SI-8858 doc: fix note about PartialFunction in Function0, F1 and F2vsalvis2015-06-173-18/+3
| | | |
| * | | Merge pull request #4553 from som-snytt/issue/implicit-docSeth Tisue2015-06-181-0/+6
| |\ \ \ | | | | | | | | | | SI-9354 ScalaDoc members added via by-name view
| | * | | SI-9354 ScalaDoc members added via by-name viewSom Snytt2015-06-141-0/+6
| | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eligible views were looked up by exact from type without including the by-name dodge. By-name views are now included without consideration whether ScalaDoc processes possible duplicates correctly.
| * | | Merge pull request #4527 from nicky-zs/fix_BigDecimalLukas Rytz2015-06-181-2/+2
| |\ \ \ | | |_|/ | |/| | fix BigDecimal losing MathContext
| | * | fix BigDecimal loosing MathContextZhong Sheng2015-05-271-2/+2
| | | |
| * | | Merge pull request #4558 from janekdb/2.11.x-scaladoc-1-list-buffer-tryAdriaan Moors2015-06-172-2/+2
| |\ \ \ | | | | | | | | | | Improve API documentation for ListBuffer and Try
| | * | | Improve API documentation for ListBuffer and TryJanek Bogucki2015-06-162-2/+2
| | | | |