summaryrefslogtreecommitdiff
path: root/src/library
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #4727 from SethTisue/unset-stray-execute-bitsSeth Tisue2015-09-1419-0/+0
|\ \ \ | |/ / |/| | unset inappropriate execute bits
| * | unset inappropriate execute bitsSeth Tisue2015-09-0219-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I imagine these date back to old Subversion days and are probably the result of inadvertent commits from Windows users with vcs client configs. having the bit set isn't really harmful most of the time, but it's just not right, and it makes the files stand out in directory listings for no reason
* | | Merge pull request #4714 from Ichoran/issue/9407Seth Tisue2015-09-081-10/+1
|\ \ \ | | | | | | | | SI-9407 Vector implementation bit-shift bugfix
| * | | SI-9407 Vector implementation bit-shift bugfixRex Kerr2015-08-291-10/+1
| |/ / | | | | | | | | | | | | | | | Fixed logically incorrect or unnecessary code in Vector as reported by Dirk Toewe. No tests. Because of the size of the vectors, tests would be impractically slow. Also, the logic is quite clear: when you are recursing through a tree, using the wrong bit shift means you hit the wrong part of the tree, and when you create and then always overwrite a mutable var, you should just not do it to begin with.
* | | Merge pull request #4333 from Ichoran/opt-Iterator-2.11.xSeth Tisue2015-09-081-59/+162
|\ \ \ | | | | | | | | Performance optimization - Iterator
| * | | Performance optimization - Iterator span, collect, dropWhileRex Kerr2015-08-071-35/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrite of span to avoid double-indirection of `.buffered` and to avoid use of `mutable.Queue` unless it is absolutely necessary. Rewrite of `span` and `dropWhile` to also avoid `.buffered` (less DRY but single vs. double indirection and object allocation). Performance improvements: ``` method reason =========== =============================================================== collect 2.3x faster on small collections, 1.5x on large span 1.6-1.7x faster on small collections 0.85x-1.8x slower/faster on large collections depending on how much must be cached (0.85x all, 1.8x none) dropWhile 1.2x faster on small collections, half the garbage ```
| * | | Performance optimization - Iterator flatMap, find, indexWhere, indexOfRex Kerr2015-08-071-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tightened up bytecode, logic, and/or performance by using local return instead of a mutable variable in several methods. Performance/bytecode size improvements (smaller bytecode = better inlining) ``` method reason =========== =============================================================== flatMap hasNext bytecode 34 bytes down from 62 find bytecode 41 bytes instead of 53 indexWhere 1.5x faster on small collections (some contexts) indexOf bytecode 89 bytes instead of 110 ```
* | | | Merge pull request #4713 from SethTisue/batch-of-typosJason Zaugg2015-09-081-2/+2
|\ \ \ \ | | | | | | | | | | fix typos/spelling
| * | | | fix assorted typosSeth Tisue2015-08-281-2/+2
| | |/ / | |/| |
* | | | Merge pull request #4722 from janekdb/2.11.x-scaladoc-in-context-AnyValDick Wall2015-09-061-1/+1
|\ \ \ \ | |_|_|/ |/| | | Link to completed value classes SIP page instead of pending version
| * | | Link to completed value classes SIP page instead of pending versionJanek Bogucki2015-09-011-1/+1
| |/ /
* | | Merge pull request #4726 from janekdb/2.11.x-now-Oracle-urlsSeth Tisue2015-09-033-3/+3
|\ \ \ | | | | | | | | Update Java and Sun URLs to replacement Java and Oracle URLs
| * | | Update Java and Sun URLs to replacement Java and Oracle URLsJanek Bogucki2015-09-023-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For each URL - Where it redirected the target of the redirection was used - Where is no longer existed a replacement was selected
* | | | Merge pull request #4715 from Ichoran/issue/9424Seth Tisue2015-09-021-2/+13
|\ \ \ \ | |/ / / |/| | | SI-9424 Clarify behavior of PriorityQueue toString
| * | | SI-9424 Clarify behavior of PriorityQueue toStringRex Kerr2015-08-291-2/+13
| |/ / | | | | | | | | | | | | | | | Clarified that PriorityQueue will not print in order and gave an example of a workaround if one needs it. Documentation change only; no tests.
* | | Merge pull request #4701 from janekdb/2.11.x-scaladoc-in-context-OptionSeth Tisue2015-09-021-1/+1
|\ \ \ | |/ / |/| | Improve comment in Option.collect example
| * | Improve implementation comments in Option.collect exampleJanek Bogucki2015-08-311-1/+1
| | |
* | | Merge pull request #4707 from fthomas/topic/pins-linkLukas Rytz2015-08-281-2/+3
|\ \ \ | | | | | | | | Add link to online version of Programming in Scala
| * | | Add link to online version of Programming in ScalaFrank S. Thomas2015-08-241-2/+3
| | | |
* | | | SI-8346 Re-established soundness of toSet (element type widening)Rex Kerr2015-08-265-5/+43
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | toSet needs to rebuild some child classes, but not others, as toSet is allowed to widen element types (which the invariant Set normally cannot do), and some sets rely upon their invariance. Thus, sets that rely upon their invariance now rebuild themselves into a generic set upon toSet, while those that do not just sit there. Note: there was a similar patch previously that fixed the same problem, but this is a reimplementation to circumvent license issues. Note: the newBuilder method was benchmarked as (surprisingly!) the most efficient way to create small sets, so it is used where sets may need to be rebuild.
* / / Fix typos in spec, docs and commentsMichaƂ Pociecha2015-08-231-1/+1
|/ /
* | Merge pull request #4693 from scala/revert-3791-ticket/8346Seth Tisue2015-08-203-24/+6
|\ \ | | | | | | Revert "SI-8346 Rebuild invariant sets in #toSet, avoiding CCE"
| * | Revert "SI-8346 Rebuild invariant sets in #toSet, avoiding CCE"Adriaan Moors2015-08-183-24/+6
| |/
* | Merge pull request #4697 from martijnhoekstra/patch-3Seth Tisue2015-08-191-2/+2
|\ \ | | | | | | Fix documentation of Stream.filter introduced in 13f30c
| * | Fix documentation of filter introduced in 13f30cmartijnhoekstra2015-08-191-2/+2
| |/
* / Fix method name reference in Predef documentationJanek Bogucki2015-08-191-1/+1
|/
* Merge pull request #4620 from lastland/patch-1Seth Tisue2015-08-071-1/+2
|\ | | | | Fix the bug in the example in scala.sys.process
| * Wait until the cat process is finished.Li Yao2015-08-071-1/+2
| |
| * Fix the bug in the example in scala.sys.processLi Yao2015-07-111-1/+1
| | | | | | There's no `!` method with argument type `ProcessIO`. I suppose this is intended to be `run`.
* | Merge pull request #4443 from adriaanm/abstractpromise-avoid-unsafeSeth Tisue2015-08-061-30/+7
|\ \ | | | | | | SI-8362: AbstractPromise extends AtomicReference, avoids sun.misc.Unsafe
| * | SI-8362: AbstractPromise extends AtomicReferenceMariot Chauvin2015-07-291-30/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid `sun.misc.Unsafe`, which is not supported on Google App Engine. Deprecate `AbstractPromise` --> extend `j.u.c.atomic.AtomicReference` directly. `AtomicReference.compareAndSet()` should also provide better performance on HotSpot, which compiles it down to the machine's CAS instruction. The binary incompatible change is ok because it's in an internal package. I can't think of any real issue with adding a superclass (which contributes only final methods) to a class in an implementation package (as long as those methods were not introduced in any illicit subclasses of said class). Instead of changing `DefaultPromise`'s super class, let's be more conservative, and do it closest to the source. This is both clearer and more focussed, leaving those subclasses of AbstractPromise we never heard of unaffected. Genesis of the commit: since the work on `Future` performance, `AbstractPromise` is using `Unsafe`, breaking the ability for `Future` to be executed on GAE. At that time, viktorklang suggested to implement a fallback in case `Unsafe` is not available. carey proposed an implementation, and mchv submitted a patch, which was refined by adriaanm.
* | | Merge pull request #4684 from janekdb/2.11.x-unit-return-in-mapSeth Tisue2015-08-061-1/+1
|\ \ \ | | | | | | | | Stop mapping to Unit when executing finally code.
| * | | Stop mapping to Unit when executing finally code.Janek Bogucki2015-08-051-1/+1
| | | | | | | | | | | | | | | | Finally.invoke has result type Unit so foreach is sufficient here.
* | | | Avoid unnecessary implicit view on StringJanek Bogucki2015-08-051-2/+2
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using length instead of size on String to avoid a conversion call. This dump confirms there is a conversion to StringOps when using size. object StringSize { val s = "hi" println(s.size) } $ scalac -Xprint:typer StringSize.scala [[syntax trees at end of typer]] // StringSize.scala package <empty> { object StringSize extends scala.AnyRef { def <init>(): StringSize.type = { StringSize.super.<init>(); () }; private[this] val s: String = "hi"; <stable> <accessor> def s: String = StringSize.this.s; scala.this.Predef.println(scala.this.Predef.augmentString(StringSize.this.s).size) } }
* / / 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
| |
* | SI-9406 fix doc for Range.takeRightSeth Tisue2015-07-181-1/+1
|/
* 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
| |
* | 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