| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |_|/ /
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fixes #3330 with Scaladoc changes only
|
| | |_|/ /
| |/| | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix SI-7443 Range.sum ignoring Numeric argument and always assuming default 'plus' implementation
|
| | |/ / /
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Previously both Range and NumeriRange used formula for sum of elements
of arithmetic series and thus always assumed that provided Numeric is
regular one.
Bug is now fixed by conservatively checking if Numeric is one of
default ones and the formula still holds.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove temporary binary compat scaffolding from AbstractPartiionFun.
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
These were only needed during the transition period when we removed
specialization on AnyRef from `AbstractPartialFunction`.
It's time to cast away the crutches.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix typo in documentation
|
| |/ / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
SI-7491 fix typo in scala.App documentation
|
| |/ / / /
| | | | |
| | | | |
| | | | | |
App.main should never be overridden, so let's enforce it.
|
|/ / / /
| | | |
| | | |
| | | | |
Value class member need not be public in 2.11+
|
|\ \ \ \
| | | | |
| | | | | |
SI-7492 Make scala.runtime.MethodCache private[scala]
|
| |/ / /
| | | |
| | | |
| | | |
| | | | |
These are internal implementation details which shouldn't be exposed
to users (and might go away when support for invokedynamic is added).
|
|\ \ \ \
| | | | |
| | | | | |
Fix (postfix abs for -0.0)
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | | |
SI-8102 points out that -0.0.abs returns -0.0 (in error). The same issue
exists for -0.0f. This commit fixes the issue for both by delegating to
math.abs.
|
|\ \ \ \
| |/ / /
|/| | | |
Resolves SI-7837, failure in quickSort.
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | | |
because the code uses '==' instead of 'equiv'
== instead of equiv (from Ordering) was used by mistake. Fixed.
Also created a test to make sure that == is not used by throwing an exception if it is (as suggested by Jason).
|
|\ \ \
| | | |
| | | | |
Fix typos in documentation
|
| | |/
| |/| |
|
|\ \ \
| | | |
| | | | |
SI-7880 Fix infinite loop in ResizableArray#ensureSize
|
| |/ /
| | |
| | |
| | |
| | |
| | | |
This issue was triggered for values greater than Int.MaxValue/2, which
caused the computation of the new array size to overflow and become
negative, leading to an infinite loop.
|
|\ \ \
| |_|/
|/| | |
fix Stream#flatten example
|
| |/ |
|
|/
|
|
|
|
| |
Remove an ancient, commented out microbenchmark from HashSet and HashMap.
Also, fix indentation for while loop in HashSet.foreach and remove some
other commented out code that no longer serves any purpose.
|
|\
| |
| | |
SI-7546 Use likely monotonic clock source for durations
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
System.currentTimeMillis is affected by wall-clock time, which means
things can appear to jump back in time.
Use System.nanoTime which is more likely¹ to be monotonic instead.
¹ See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6458294
"nanoTime affected by system clock change on Linux (RH9) or in
general lacks monotonicity".
|
|\ \
| | |
| | | |
Use Serialization Proxy Pattern in List
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Modify List to use the Serialization Proxy Pattern instead of
directly mutating its state during deserialization.
Use the proxy at the List level for both Nil and :: for simplicity.
Change one member variable (hd) to val from var as a result. The
other member variable (tl) cannot yet be changed to val because
it is mutated by ListBuffer in the library and Types in reflection.
|
|\ \
| | |
| | | |
SI-8059 Override immutable.Queue#{+:,:+} for performance
|
| |/
| |
| |
| | |
Without those overrides, all elements are unnecessarily copied.
|
|\ \
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
build.examples.xml
build.xml
docs/examples/actors/pingpong.scala
docs/examples/fors.scala
docs/examples/iterators.scala
docs/examples/jolib/Ref.scala
docs/examples/jolib/parallelOr.scala
docs/examples/monads/callccInterpreter.scala
docs/examples/monads/directInterpreter.scala
docs/examples/monads/errorInterpreter.scala
docs/examples/monads/simpleInterpreter.scala
docs/examples/monads/stateInterpreter.scala
docs/examples/parsing/ArithmeticParser.scala
docs/examples/patterns.scala
docs/examples/pilib/elasticBuffer.scala
docs/examples/pilib/handover.scala
docs/examples/pilib/piNat.scala
docs/examples/typeinf.scala
src/build/pack.xml
|
| |
| |
| |
| |
| | |
Otherwise, objects with exception-throwing `toString` lead to a
cascading error far removed from the originally failed match.
|
|\ \
| | |
| | | |
add method dequeueOption to immutable.Queue
|
| | |
| | |
| | |
| | |
| | |
| | | |
This allows immutable.Queue to be used conveniently in functional code.
Method is in the spirit of `headOption` on seqs or `get` on maps. Also
adds a unit test for immutable.Queue.
|
|\ \ \
| | | |
| | | | |
Merge #3209 and 2.10.x to master
|
| |\ \ \
| | | |/
| | |/|
| | | |
| | | | |
Conflicts:
test/files/jvm/scala-concurrent-tck.scala
|
| | | |
| | | |
| | | |
| | | | |
Origin: viktorklang@1bbe854
|
|\ \ \ \
| |_|_|/
|/| | | |
Remove parallel collection views and, with them, Gen*View
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- code that used to be inherited in *View is now inlined
- the `view` methods on `ParIteratoa` and `ParSeq` now
convert to sequential collections, and are deprecated
asking the user to do this explicitly in the future.
Should be largely source compatible with 2.10.x, on the assumption
that the removed classes, while being public, were internal
implementation details.
A few tests used now-removed classes to demonstrate compiler crashes.
I managed to confirm that after my decoupling, t4365 still exercises
the bug:
% qbin/scalac test/files/pos/t4365/*.scala
warning: there were 2 deprecation warning(s); re-run with -deprecation for details
one warning found
% scalac-hash 7b4e450 test/files/pos/t4365/*.scala
warning: there were 2 deprecation warning(s); re-run with -deprecation for details
one warning found
% scalac-hash 7b4e450~1 test/files/pos/t4365/*.scala 2<&1 | grep -i wrong
error: something is wrong: cannot make sense of type application
something is wrong: cannot make sense of type application
something is wrong: cannot make sense of type application
I didn't manage to do the same for specializes-sym-crash.scala,
and instead just made it compile.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
In 2.12, this gives us the option to move the code from
Gen*View down into *View. If we don't do something more
drastic with views, which inertia and history suggests
is a real possibility, we can at least shed a little of
the implementation.
These abstractions are *only* used to share implementation;
there is no `view` method available on, for instance, `GenSeq`
that lets one abstract over parallel/sequential collections
while spawning views.
scala> (List(1): collection.GenSeq[Int]).view
<console>:8: error: value view is not a member of scala.collection.GenSeq[Int]
(List(1): collection.GenSeq[Int]).view
^
Let's keep it that way.
I suspect that views over parallel collections exist not because
they were the most sought after feature, but rather because the
initial incarnatin of parallel collections used to live undernead
TraversableOnce, and hence were obligated to implement `def view`.
This change will give us deprecation warnings in the non deprecated
places that extend `Gen*View` (three, by my count) in the interim.
There are ways to avoid this, but they aren't particularly appealing.
|
|\ \ \ \
| | | | |
| | | | | |
Fixes SI-8014, regression in Vector ++ TraversableOnce.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Now uses the cached copy instead of the exhausted iterator. Adds a JUnit
test for ++.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The danger of:
new Vector(1, 2, 3).toString
java.lang.NullPointerException
and the "should have been private all along" argument
call for a break in the source compatibility policy here.
|
| |/ /
|/| |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The change in ce1bbfe / SI-6406 introduced overloads of
`unapplySeq` with wider static and dynmaic result types
than the now-deprecated alternative that accepted `Any`.
This is subtly source incompatible and the change was noticed
in Specs2.
This commit uses `List` as the static and runtime type for
the new overloads.
For consistency, the same is done for the new method added
in SI-7737 / 93e9623.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
These currently result in runtime errors:
scala> List(1).view.distinct.force
java.lang.UnsupportedOperationException: SeqView(...).newBuilder
scala> List(1).view.inits.toList
java.lang.UnsupportedOperationException: SeqView(...).newBuilder
Two tests are enclosed:
1. reflect on the views to make any method that returns
`Repr` is overriden in `*ViewLike`. This guards against
new additions to the collections API.
2. exercise the newly added overrides
Some care is needed with `tail`, we must re-override it
in `mutable.IndexedSeqView` to be explicit about the
end point of the slice, because the `IndexedSeqView#Sliced`
defines length in terms of that. (Higher up the chain, it
is just `iterator.size`, that's why `SeqView#tail` just sets
up a slice from `1 to Int.MaxValue`.)
Parallel collections views are not touched, as these are likely
to be deprecated or removed shortly.
Before this change, the test reported the following.
Not all of these methods were buggy. For instance, `sortBy`,
`sortWith` are implemented in terms of `sorted` which
was implemented in `SeqViewLike`. Even in those cases, I have
opted to override the methods in the `ViewLike` to guard
against changes in the base class implementation and to
simplify the rules in the test.
======================================================================
Checking scala.collection.TraversableView
======================================================================
trait TraversableLike
----------------------------------------------------------------------
def filterNot(p: A => Boolean): Repr
def inits: Iterator[Repr]
def tails: Iterator[Repr]
override def tail: Repr
======================================================================
Checking scala.collection.IterableView
======================================================================
trait IterableLike
----------------------------------------------------------------------
def dropRight(n: Int): Repr
def sliding(size: Int): Iterator[Repr]
def takeRight(n: Int): Repr
trait TraversableLike
----------------------------------------------------------------------
def filterNot(p: A => Boolean): Repr
def inits: Iterator[Repr]
def tails: Iterator[Repr]
override def tail: Repr
======================================================================
Checking scala.collection.SeqView
======================================================================
trait IterableLike
----------------------------------------------------------------------
def dropRight(n: Int): Repr
def sliding(size: Int): Iterator[Repr]
def takeRight(n: Int): Repr
trait SeqLike
----------------------------------------------------------------------
def combinations(n: Int): Iterator[Repr]
def distinct: Repr
def permutations: Iterator[Repr]
def sortBy[B](f: A => B)(implicit ord: scala.math.Ordering[B]): Repr
def sortWith(lt: (A, A) => Boolean): Repr
trait TraversableLike
----------------------------------------------------------------------
def filterNot(p: A => Boolean): Repr
def inits: Iterator[Repr]
def tails: Iterator[Repr]
override def tail: Repr
======================================================================
Checking scala.collection.mutable.IndexedSeqView
======================================================================
trait IndexedSeqOptimized
----------------------------------------------------------------------
override def dropRight(n: Int): Repr
override def tail: Repr
override def takeRight(n: Int): Repr
trait IterableLike
----------------------------------------------------------------------
def sliding(size: Int): Iterator[Repr]
trait SeqLike
----------------------------------------------------------------------
def combinations(n: Int): Iterator[Repr]
def distinct: Repr
def permutations: Iterator[Repr]
def sortBy[B](f: A => B)(implicit ord: scala.math.Ordering[B]): Repr
def sortWith(lt: (A, A) => Boolean): Repr
trait TraversableLike
----------------------------------------------------------------------
def filterNot(p: A => Boolean): Repr
def inits: Iterator[Repr]
def tails: Iterator[Repr]
======================================================================
Checking scala.collection.immutable.StreamView
======================================================================
trait IterableLike
----------------------------------------------------------------------
def dropRight(n: Int): Repr
def sliding(size: Int): Iterator[Repr]
def takeRight(n: Int): Repr
trait SeqLike
----------------------------------------------------------------------
def combinations(n: Int): Iterator[Repr]
def distinct: Repr
def permutations: Iterator[Repr]
def sortBy[B](f: A => B)(implicit ord: scala.math.Ordering[B]): Repr
def sortWith(lt: (A, A) => Boolean): Repr
trait TraversableLike
----------------------------------------------------------------------
def filterNot(p: A => Boolean): Repr
def inits: Iterator[Repr]
def tails: Iterator[Repr]
override def tail: Repr
|
|\ \ \
| | | |
| | | | |
Revise paragraph (a revised #3164)
|
| |/ /
| | |
| | | |
Revise text further, following suggestions in #3164 and part of the suggestions by @som-snytt. But I've kept "appear", since this paragraph documents the external behavior, not the implementation.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
As demonstrated in
https://groups.google.com/d/topic/scala-language/eC9dqTTBYHg, SOEs
should be considered fatal, because all popular JVM implementations
seem to run into inconsistent state (ignoring finally blocks leading
to not running monitorExit, leading to locks not being unlocked, ...)
if one just pushes them enough.
|
|\ \ \
| | | |
| | | | |
Remove deprecated constructor from the migration annotation
|