diff options
author | Sébastien Doeraene <sjrdoeraene@gmail.com> | 2016-04-13 13:09:19 +0200 |
---|---|---|
committer | Sébastien Doeraene <sjrdoeraene@gmail.com> | 2016-04-13 16:20:46 +0200 |
commit | 51996c8474a06656f8c21302af2b4151bdc2393e (patch) | |
tree | 169bf4b6aadaf4b1af6cd7df95c4311aff04d4a5 | |
parent | 950f6df06ef122cc6b71a4b402b1b22d9e5376dc (diff) | |
download | scala-51996c8474a06656f8c21302af2b4151bdc2393e.tar.gz scala-51996c8474a06656f8c21302af2b4151bdc2393e.tar.bz2 scala-51996c8474a06656f8c21302af2b4151bdc2393e.zip |
Move ScalaRunTime.isAnyVal to reify.phases.Reify.
Because that is the only call site of that method.
-rw-r--r-- | src/compiler/scala/reflect/reify/phases/Reify.scala | 6 | ||||
-rw-r--r-- | src/library/scala/runtime/ScalaRunTime.scala | 5 | ||||
-rw-r--r-- | test/instrumented/library/scala/runtime/ScalaRunTime.scala | 5 |
3 files changed, 5 insertions, 11 deletions
diff --git a/src/compiler/scala/reflect/reify/phases/Reify.scala b/src/compiler/scala/reflect/reify/phases/Reify.scala index 143424dac5..93f6f99d81 100644 --- a/src/compiler/scala/reflect/reify/phases/Reify.scala +++ b/src/compiler/scala/reflect/reify/phases/Reify.scala @@ -1,7 +1,6 @@ package scala.reflect.reify package phases -import scala.runtime.ScalaRunTime.isAnyVal import scala.reflect.reify.codegen._ trait Reify extends GenSymbols @@ -57,4 +56,9 @@ trait Reify extends GenSymbols case _ => throw new Error("reifee %s of type %s is not supported".format(reifee, reifee.getClass)) }) + + private def isAnyVal(x: Any) = x match { + case _: Byte | _: Short | _: Char | _: Int | _: Long | _: Float | _: Double | _: Boolean | _: Unit => true + case _ => false + } } diff --git a/src/library/scala/runtime/ScalaRunTime.scala b/src/library/scala/runtime/ScalaRunTime.scala index dd973d12da..71a3603a42 100644 --- a/src/library/scala/runtime/ScalaRunTime.scala +++ b/src/library/scala/runtime/ScalaRunTime.scala @@ -31,11 +31,6 @@ object ScalaRunTime { def isValueClass(clazz: jClass[_]) = clazz.isPrimitive() - def isAnyVal(x: Any) = x match { - case _: Byte | _: Short | _: Char | _: Int | _: Long | _: Float | _: Double | _: Boolean | _: Unit => true - case _ => false - } - // A helper method to make my life in the pattern matcher a lot easier. def drop[Repr](coll: Repr, num: Int)(implicit traversable: IsTraversableLike[Repr]): Repr = traversable conversion coll drop num diff --git a/test/instrumented/library/scala/runtime/ScalaRunTime.scala b/test/instrumented/library/scala/runtime/ScalaRunTime.scala index 9b01eec039..6e758abde0 100644 --- a/test/instrumented/library/scala/runtime/ScalaRunTime.scala +++ b/test/instrumented/library/scala/runtime/ScalaRunTime.scala @@ -37,11 +37,6 @@ object ScalaRunTime { def isValueClass(clazz: jClass[_]) = clazz.isPrimitive() - def isAnyVal(x: Any) = x match { - case _: Byte | _: Short | _: Char | _: Int | _: Long | _: Float | _: Double | _: Boolean | _: Unit => true - case _ => false - } - /** Return the class object representing an array with element class `clazz`. */ def arrayClass(clazz: jClass[_]): jClass[_] = { |