| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
SI-6935 Added readResolve in BoxedUnit
|
| |
| |
| |
| |
| | |
When deserializing Unit, it would return an instance of Object, but not a Scala Unit.
By adding readResolve, the deserialization of Unit will work.
|
|\ \
| |/
|/| |
SI-6370 changed ListMap apply0 method to produce correct error message
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
a key is not found
Current implementation of apply0 relies on tail method to iterate over all keys.
When the list gets to its end, tail produces an 'empty map' message in its exception, which is thrown by ListMap.
This change checks if the collection is empty before calling tail and provides a more appropriate key not found message.
Signed-off-by: Vinicius Miana <vinicius@miana.com.br>
|
|\ \
| | |
| | | |
[backport] SI-6478 Fixing JavaTokenParser ident
|
| | |
| | |
| | |
| | |
| | | |
Backport of 256934160007079f473131469af2df4d023c2cfc from PR
https://github.com/scala/scala/pull/1466
|
|/ /
| |
| |
| |
| |
| |
| | |
Revert list serialization back to what it was in 2.9.x and before.
Partial revert of a6fcd70b60 e234978dfd, which fixed SI-5374.
The ListBuffer part of the fix remains in place.
|
| |
| |
| |
| | |
This reverts commit 02b2da63409af6a28824cbb74d00d0ec04518c8d.
|
| |
| |
| |
| |
| |
| |
| |
| | |
The back ported fix of SI-6150 1f0e4880ad7ad816fd82c04f6814c5b165f86981
broke binary compatibility. This commit fixes that by removing the
IndexedSeqFactory class and copy/pasting its one method around to
everything that extended it then re-adds some inner
classes needed by the binary compatibility checker.
|
| |
| |
| |
| |
| |
| |
| | |
This reverts commit c6866a28faf67cd2e455f9a0a829859a73e38819 because it adds two
members to the API and so breaks forward binary compatibility.
Attention: this is only intended for 2.10.x, not for 2.11.
|
|\ \
| | |
| | | |
SI-7029 - Makes sure that uncaught exceptions are propagated to the UEH ...
|
| | |
| | |
| | |
| | | |
the global ExecutionContext
|
|\ \ \
| | | |
| | | | |
SI-2818 Makes List#foldRight work for large lists
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Benchmarks show that lists smaller than 110 elements or so doing
reverse/foldLeft is faster than recursively walking to the end of
the list and then folding as the stack unwinds.
Above that 110 element threshold the recursive procedure is faster.
Unfortunately, at some magic unknown large size the recursive procedure
blows the stack.
This commit changes List#foldRight to always do reverse/foldLeft.
|
|\ \ \
| | | |
| | | | |
SI-6963 Add version to -Xmigration
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Adds an optional version parameter to the -Xmigration compiler setting.
Doing -Xmigration without version number behaves as it used to by
dumping every possible migration warning.
This commit adds a ScalaVersion class (plus ancillary stuff), and a
ScalaVersionSetting.
|
|\ \ \
| | | |
| | | | |
SI-6853 changed private method remove to be tail recursive.
|
| | |/
| |/|
| | |
| | | |
Operations += and -= on mutable.ListMap rely on the private method remove to perform. This methods was implemented using recursion, but it was not tail recursive. When the ListMap got too big the += caused a StackOverflowError.
|
| |/
|/|
| |
| |
| | |
[backport]
Nesting recursive calls in Stream is always a dicey business.
|
|\ \
| | |
| | | |
SI-6932 StackOverflowError in chained Future.flatMap calls
|
| | | |
|
| |/
| |
| |
| | |
internal execution context of Future
|
|\ \
| | |
| | | |
[backport] Fix unsafe array opt. / opt. primitive Array(...)
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
SI-6611, SI-6247 (partial fix)
The original commits on master were a bit circuitous, this
is squashed to a neat little package.
I had to add type arguments to the Array.apply calls in the
test case, they are inferred on master.
commit 41ff05dfdbcf032157b3509ace633f2e7a12295c
Author: Jason Zaugg <jzaugg@gmail.com>
Date: Sun Nov 4 14:44:59 2012 +0100
Refactor guards checking for a particular overload of Array.apply.
(cherry picked from commit 092345a24c22a821204fb358d33272ae8f7353be)
commit 1e5c942deccaf64f8d57bd8891b912381d7f220a
Author: Jason Zaugg <jzaugg@gmail.com>
Date: Sun Nov 4 14:17:25 2012 +0100
Expand optimization of Array(e1, ..., en) to primitive arrays.
(cherry picked from commit 8265175ecc42293997d59049f430396c77a2b891)
commit ab1bf77e39f2dfeacf3fc107ccb2907a1867f04c
Author: Jason Zaugg <jzaugg@gmail.com>
Date: Sat Nov 3 13:34:20 2012 +0100
SI-6611 Tighten up an unsafe array optimization
The net was cast too wide and was unsafely optimizing away array
copies.
(cherry picked from commit dad886659faca4fba2d4937c9bc6780591b02c27)
And also:
Optimize primitive Array(e1, ..., en)
Expands an existing optimization for reference arrays to
apply to primitives, as well.
Fixes one aspect of SI-6247.
(cherry picked from commit cac5a08611f9511ba4d94b99db630404efae190a)
Conflicts:
src/compiler/scala/tools/nsc/transform/CleanUp.scala
More principled tree copying.
Canonical > home-spun.
Conflicts:
src/compiler/scala/tools/nsc/transform/CleanUp.scala
|
|/
|
|
|
|
|
| |
- SI-6923 uncovered a few valid warnings, these have been
addressed.
- A pair of "catches all throwable" warnings appeared; one
of the is spurious and the subject of SI-6994.
|
|\
| |
| | |
SI-6930 adds documentation to reduceLeft in TraversableOnce
|
| | |
|
|\ \
| | |
| | | |
SI-6946, SI-6924 Greatly improves IsTraversableLike docs
|
| |/ |
|
|/
|
|
| |
Backport of 63ba3d64a7002ef67f7f13083a18fe1042a3adba
|
|\
| |
| | |
SI-6915 Updates copyright properties to 2002-2013
|
| |
| |
| |
| |
| |
| |
| |
| | |
The .scala header files had the right copyright dates
but properties used to generate the information in
e.g. "scala -version" hadn't been updated.
review @adriaanm
|
|\ \
| | |
| | | |
Backport 1821
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
the manifests for Any, Object/AnyRef, AnyVal, Null and Nothing
now have their `newArray` methods overridden to avoid reflective overhead
of array instantiation.
(backport of 45ef0514e, part 2)
|
| | |
| | |
| | |
| | | |
(backport of 45ef0514e, part 1)
|
|\ \ \
| |_|/
|/| | |
Fix Iterator#copyToArray (fixes SI-6827).
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
As pointed out in #scala, when using a non-zero start it's possible
to get an ArrayIndexOutOfBoundsException due to an incorrect bounds
check. This patch fixes this, as well as another potential bounds
error, and adds test cases.
Incorporates some other suggestions by Som-Snytt to ensure that
callers will get useful error messages in cases where the start
parameter is wrong (negative or out-of-array-bounds).
Review by @som-snytt.
|
|\ \
| |/
|/| |
SI-5017 Poor performance of :+ operator on Arrays
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Control performance of :+ and +: operator on my machine were 700-800 ms
After adding size hint on the implementation in SeqLike, it went down to 500-600 ms
But with specialixed implementation in ArrayOps, brings it down to 300-400 ms
Unfortunatly, this method will only be called when the Array object is being referenced directly as it's type, but that should be the case enough times to justify the extra method.
I ended up removing the sizeHint in SeqLike because it made the execution of the "benchmark" slower when the Array was being manipulated as a Seq.
Side note: Interestingly enough, the benchmark performed better on my virtualized Fedora 17 with JDK 7 than natively on Mac OS X with JDK 6
|
|\ \
| | |
| | | |
Stream.zip naturalsEx example does not compile => remove extra zip call
|
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
Had to fix up an iffy test: not only was it testing undefined
behavior, it demanded just the right numbers be printed in a
context where all negative or positive numbers are equivalent.
It's the ol' "get them coming and going" trick.
|
|/
|
|
|
|
|
| |
The lengthCompare method in LinearSeqOptimized was looking one
step further than it needed to in order to give the correct
result, which was creating some unwanted side effects related to
Streams.
|
|\
| |
| | |
SI-6690 Release reference to last dequeued element.
|
| |
| |
| |
| |
| |
| | |
This is in line with the existing implementation
of `MutableList#clear`, and in line with an newly
created empty collection.
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Avoids leaks in MutableList and its more better known child,
mutable.Queue, when the last element is dequeued or when we
take the tail of a one element collection.
Refactors copy/pasted code between the two implementations of
tail.
|
|\ \
| | |
| | | |
SI-6535 Step back from the precipice of a cycle
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adding any non-local parent to WrapAsScala will trigger a valid
cyclic reference error. By moving the import of `Wrapper._`
inside `WrapAsScala` and `WrapAsJava`, it is not in scope when
typing the parents of those, and we avoid the cycle.
Adds a test case to show the essense of the promiscious mutual
imports that triggers this.
|
|\ \
| | |
| | | |
SI-5678 Bad return type for [Use Case] docs in Range
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Many [Use Case] example in Range such as the one associated to the union method document that the method returns a Range which is just plain false.
Example:
val ran1 = Range(1,3)
val ran2 = Range(54, 57)
val result = ran1.union(ran2) // This is a perfectly valid use case yet obviously cannot be represented as a Range
|