summaryrefslogtreecommitdiff
path: root/test/instrumented
diff options
context:
space:
mode:
authorSébastien Doeraene <sjrdoeraene@gmail.com>2016-04-13 17:11:15 +0200
committerSébastien Doeraene <sjrdoeraene@gmail.com>2016-04-13 17:11:15 +0200
commit5e7e81ab2a39182b8150c0d661cdbc89ca82c5b0 (patch)
treeb27bab258279aa739c8498f6f82e2338046ec058 /test/instrumented
parent246cd636b0e2e5861ee93e7a18d1940d2f6f6fce (diff)
downloadscala-5e7e81ab2a39182b8150c0d661cdbc89ca82c5b0.tar.gz
scala-5e7e81ab2a39182b8150c0d661cdbc89ca82c5b0.tar.bz2
scala-5e7e81ab2a39182b8150c0d661cdbc89ca82c5b0.zip
Remove plain old dead code in ScalaRunTime.
Diffstat (limited to 'test/instrumented')
-rw-r--r--test/instrumented/library/scala/runtime/ScalaRunTime.scala40
1 files changed, 0 insertions, 40 deletions
diff --git a/test/instrumented/library/scala/runtime/ScalaRunTime.scala b/test/instrumented/library/scala/runtime/ScalaRunTime.scala
index 7bd94ef7ca..7480ad6fbf 100644
--- a/test/instrumented/library/scala/runtime/ScalaRunTime.scala
+++ b/test/instrumented/library/scala/runtime/ScalaRunTime.scala
@@ -35,8 +35,6 @@ object ScalaRunTime {
private def isArrayClass(clazz: jClass[_], atLevel: Int): Boolean =
clazz.isArray && (atLevel == 1 || isArrayClass(clazz.getComponentType, atLevel - 1))
- def isValueClass(clazz: jClass[_]) = clazz.isPrimitive()
-
/** Return the class object representing an array with element class `clazz`.
*/
def arrayClass(clazz: jClass[_]): jClass[_] = {
@@ -153,9 +151,6 @@ object ScalaRunTime {
m
}
- def checkInitialized[T <: AnyRef](x: T): T =
- if (x == null) throw new UninitializedError else x
-
def _toString(x: Product): String =
x.productIterator.mkString(x.productPrefix + "(", ",", ")")
@@ -175,33 +170,12 @@ object ScalaRunTime {
}
}
- /** Fast path equality method for inlining; used when -optimise is set.
- */
- @inline def inlinedEquals(x: Object, y: Object): Boolean =
- if (x eq y) true
- else if (x eq null) false
- else if (x.isInstanceOf[java.lang.Number]) BoxesRunTime.equalsNumObject(x.asInstanceOf[java.lang.Number], y)
- else if (x.isInstanceOf[java.lang.Character]) BoxesRunTime.equalsCharObject(x.asInstanceOf[java.lang.Character], y)
- else x.equals(y)
-
- def _equals(x: Product, y: Any): Boolean = y match {
- case y: Product if x.productArity == y.productArity => x.productIterator sameElements y.productIterator
- case _ => false
- }
-
/** Implementation of `##`. */
def hash(x: Any): Int =
if (x == null) 0
else if (x.isInstanceOf[java.lang.Number]) BoxesRunTime.hashFromNumber(x.asInstanceOf[java.lang.Number])
else x.hashCode
- /** A helper method for constructing case class equality methods,
- * because existential types get in the way of a clean outcome and
- * it's performing a series of Any/Any equals comparisons anyway.
- * See ticket #2867 for specifics.
- */
- def sameElements(xs1: scala.collection.Seq[Any], xs2: scala.collection.Seq[Any]) = xs1 sameElements xs2
-
/** Given any Scala value, convert it to a String.
*
* The primary motivation for this method is to provide a means for
@@ -293,18 +267,4 @@ object ScalaRunTime {
nl + s + "\n"
}
- private[scala] def checkZip(what: String, coll1: TraversableOnce[_], coll2: TraversableOnce[_]) {
- if (sys.props contains "scala.debug.zip") {
- val xs = coll1.toIndexedSeq
- val ys = coll2.toIndexedSeq
- if (xs.length != ys.length) {
- Console.err.println(
- "Mismatched zip in " + what + ":\n" +
- " this: " + xs.mkString(", ") + "\n" +
- " that: " + ys.mkString(", ")
- )
- (new Exception).getStackTrace.drop(2).take(10).foreach(println)
- }
- }
- }
}