summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSeth Tisue <seth@tisue.net>2015-09-08 14:34:46 -0500
committerSeth Tisue <seth@tisue.net>2015-09-08 14:34:46 -0500
commit7ec4207a2fa84e7a35f514a911893b7e3cb57672 (patch)
tree13f8ec94faba80e36cd25ade3ae131f335604fd3 /src
parentd69aa70be2129b51c106fc4a56f62061567fa47e (diff)
parent60cdb31dfb10c1af4dd4bd477afd38b5c67f89d7 (diff)
downloadscala-7ec4207a2fa84e7a35f514a911893b7e3cb57672.tar.gz
scala-7ec4207a2fa84e7a35f514a911893b7e3cb57672.tar.bz2
scala-7ec4207a2fa84e7a35f514a911893b7e3cb57672.zip
Merge pull request #4714 from Ichoran/issue/9407
SI-9407 Vector implementation bit-shift bugfix
Diffstat (limited to 'src')
-rw-r--r--src/library/scala/collection/immutable/Vector.scala11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/library/scala/collection/immutable/Vector.scala b/src/library/scala/collection/immutable/Vector.scala
index 46d5d0c69c..8bb581d44c 100644
--- a/src/library/scala/collection/immutable/Vector.scala
+++ b/src/library/scala/collection/immutable/Vector.scala
@@ -1156,8 +1156,6 @@ private[immutable] trait VectorPointer[T] {
if (depth == 3) {
display3 = new Array(32)
display3((oldIndex >> 15) & 31) = display2
- display2 = new Array(32)
- display1 = new Array(32)
depth +=1
}
display2 = display3((newIndex >> 15) & 31).asInstanceOf[Array[AnyRef]]
@@ -1170,9 +1168,6 @@ private[immutable] trait VectorPointer[T] {
if (depth == 4) {
display4 = new Array(32)
display4((oldIndex >> 20) & 31) = display3
- display3 = new Array(32)
- display2 = new Array(32)
- display1 = new Array(32)
depth +=1
}
display3 = display4((newIndex >> 20) & 31).asInstanceOf[Array[AnyRef]]
@@ -1187,13 +1182,9 @@ private[immutable] trait VectorPointer[T] {
if (depth == 5) {
display5 = new Array(32)
display5((oldIndex >> 25) & 31) = display4
- display4 = new Array(32)
- display3 = new Array(32)
- display2 = new Array(32)
- display1 = new Array(32)
depth +=1
}
- display4 = display5((newIndex >> 20) & 31).asInstanceOf[Array[AnyRef]]
+ display4 = display5((newIndex >> 25) & 31).asInstanceOf[Array[AnyRef]]
if (display4 == null) display4 = new Array(32)
display3 = display4((newIndex >> 20) & 31).asInstanceOf[Array[AnyRef]]
if (display3 == null) display3 = new Array(32)