summaryrefslogtreecommitdiff
path: root/src/library/scala/Array.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-05-01 18:15:49 +0000
committerPaul Phillips <paulp@improving.org>2011-05-01 18:15:49 +0000
commitf82acf5d370111cb96f39332c28177f186a88f10 (patch)
tree92b5241f2e01519e5fe26c3b525d8de960793743 /src/library/scala/Array.scala
parent445ade0bbd17d8d9336d96fe3804c64e233e8b89 (diff)
downloadscala-f82acf5d370111cb96f39332c28177f186a88f10.tar.gz
scala-f82acf5d370111cb96f39332c28177f186a88f10.tar.bz2
scala-f82acf5d370111cb96f39332c28177f186a88f10.zip
Reducing the sbt launcher footprint by eliminat...
Reducing the sbt launcher footprint by eliminating val references which go through the scala package object, since they lead to otherwise unnecessary classes becoming required at startup. Mostly this means library files with constructors like "Iterator.empty" or "Stream.continually" receive a direct import of that companion. The one slightly less than cosmetic change was moving the strange xml value "$scope" back into Predef, because otherwise I have to touch the xml code generation. No review.
Diffstat (limited to 'src/library/scala/Array.scala')
-rw-r--r--src/library/scala/Array.scala9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/library/scala/Array.scala b/src/library/scala/Array.scala
index 07cf9e039f..5ff5778800 100644
--- a/src/library/scala/Array.scala
+++ b/src/library/scala/Array.scala
@@ -6,15 +6,14 @@
** |/ **
\* */
-
-
package scala
import scala.collection.generic._
-import scala.collection.mutable.{ArrayBuilder, ArraySeq}
+import scala.collection.{ mutable, immutable }
+import mutable.{ ArrayBuilder, ArraySeq }
import compat.Platform.arraycopy
import scala.reflect.ClassManifest
-import scala.runtime.ScalaRunTime.{array_apply, array_update}
+import scala.runtime.ScalaRunTime.{ array_apply, array_update }
/** Contains a fallback builder for arrays when the element type
* does not have a class manifest. In that case a generic array is built.
@@ -372,7 +371,7 @@ object Array extends FallbackArrayBuilding {
def range(start: Int, end: Int, step: Int): Array[Int] = {
if (step == 0) throw new IllegalArgumentException("zero step")
val b = newBuilder[Int]
- b.sizeHint(Range.count(start, end, step, false))
+ b.sizeHint(immutable.Range.count(start, end, step, false))
var i = start
while (if (step < 0) end < i else i < end) {