summaryrefslogtreecommitdiff
path: root/src/library/scala/collection/SeqViewLike.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-04-20 20:43:37 +0000
committerPaul Phillips <paulp@improving.org>2011-04-20 20:43:37 +0000
commit21ea5ad62747504e2c17c10c779e5c7054a2a297 (patch)
tree8e3d4ac052ffd406d179da2694a9fd93724a4e13 /src/library/scala/collection/SeqViewLike.scala
parent9be2e5463396e4a5022745c9d61a8431d53e2f99 (diff)
downloadscala-21ea5ad62747504e2c17c10c779e5c7054a2a297.tar.gz
scala-21ea5ad62747504e2c17c10c779e5c7054a2a297.tar.bz2
scala-21ea5ad62747504e2c17c10c779e5c7054a2a297.zip
One of the blips in the performance charts seem...
One of the blips in the performance charts seems to implicate some changes I made with slice to reduce the number of implementations and surface area for inconsistencies and bugs. Altering those changes in a more performance-mindful way, although I don't see anything here which is likely to help much. Also fixing some wrong documentation about copyToArray. No review.
Diffstat (limited to 'src/library/scala/collection/SeqViewLike.scala')
-rw-r--r--src/library/scala/collection/SeqViewLike.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library/scala/collection/SeqViewLike.scala b/src/library/scala/collection/SeqViewLike.scala
index f79baa7c58..77dc15e695 100644
--- a/src/library/scala/collection/SeqViewLike.scala
+++ b/src/library/scala/collection/SeqViewLike.scala
@@ -93,6 +93,10 @@ trait SeqViewLike[+A,
} with Patched[B]
protected def newPrepended[B >: A](elem: B): Transformed[B] = new { protected[this] val fst = elem } with Prepended[B]
+ // see comment in IterableViewLike.
+ protected override def newTaken(n: Int): Transformed[A] = newSliced(SliceInterval(0, n))
+ protected override def newDropped(n: Int): Transformed[A] = newSliced(SliceInterval(n, Int.MaxValue))
+
override def reverse: This = newReversed.asInstanceOf[This]
override def patch[B >: A, That](from: Int, patch: GenSeq[B], replaced: Int)(implicit bf: CanBuildFrom[This, B, That]): That = {