diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-09-19 13:01:40 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-09-19 13:01:40 +0200 |
commit | 3c542251e04cd85903ec12f5747c86d5c6c1a867 (patch) | |
tree | a343444eeb77f882e9dca37b05edc7d91afaca59 /src/library | |
parent | eb49e8176f334eebc77072cc9334c7f1875b09a2 (diff) | |
download | scala-3c542251e04cd85903ec12f5747c86d5c6c1a867.tar.gz scala-3c542251e04cd85903ec12f5747c86d5c6c1a867.tar.bz2 scala-3c542251e04cd85903ec12f5747c86d5c6c1a867.zip |
SI-6390 removes Trees#ArrayValue from the API
Introduced by uncurry - therefore it can be seen
neither by macros, nor by runtime reflection.
Despite never being pickled, ArrayValue is supported by unpickler
so I couldn't move it exclusively to scala-compiler.jar.
Figuring out the mysterious reason for pickling ArrayValue is left
to future work.
Diffstat (limited to 'src/library')
-rw-r--r-- | src/library/scala/reflect/base/Base.scala | 5 | ||||
-rw-r--r-- | src/library/scala/reflect/base/Trees.scala | 42 |
2 files changed, 5 insertions, 42 deletions
diff --git a/src/library/scala/reflect/base/Base.scala b/src/library/scala/reflect/base/Base.scala index 6ecfd384ab..7cbc39a3b6 100644 --- a/src/library/scala/reflect/base/Base.scala +++ b/src/library/scala/reflect/base/Base.scala @@ -571,10 +571,6 @@ class Base extends Universe { self => extends TermTree object UnApply extends UnApplyExtractor - case class ArrayValue(elemtpt: Tree, elems: List[Tree]) - extends TermTree - object ArrayValue extends ArrayValueExtractor - case class Function(vparams: List[ValDef], body: Tree) extends TermTree with SymTree object Function extends FunctionExtractor @@ -711,7 +707,6 @@ class Base extends Universe { self => implicit val StarTag = ClassTag[Star](classOf[Star]) implicit val BindTag = ClassTag[Bind](classOf[Bind]) implicit val UnApplyTag = ClassTag[UnApply](classOf[UnApply]) - implicit val ArrayValueTag = ClassTag[ArrayValue](classOf[ArrayValue]) implicit val FunctionTag = ClassTag[Function](classOf[Function]) implicit val AssignTag = ClassTag[Assign](classOf[Assign]) implicit val AssignOrNamedArgTag = ClassTag[AssignOrNamedArg](classOf[AssignOrNamedArg]) diff --git a/src/library/scala/reflect/base/Trees.scala b/src/library/scala/reflect/base/Trees.scala index 428b493478..6931d23173 100644 --- a/src/library/scala/reflect/base/Trees.scala +++ b/src/library/scala/reflect/base/Trees.scala @@ -538,7 +538,7 @@ trait Trees { self: Universe => } /** Alternatives of patterns. - * + * * Eliminated by compiler phases Eliminated by compiler phases patmat (in the new pattern matcher of 2.10) or explicitouter (in the old pre-2.10 pattern matcher), * except for * occurrences in encoded Switch stmt (i.e. remaining Match(CaseDef(...))) @@ -564,7 +564,7 @@ trait Trees { self: Universe => } /** Repetition of pattern. - * + * * Eliminated by compiler phases patmat (in the new pattern matcher of 2.10) or explicitouter (in the old pre-2.10 pattern matcher). */ type Star >: Null <: TermTree @@ -588,7 +588,7 @@ trait Trees { self: Universe => } /** Bind a variable to a rhs pattern. - * + * * Eliminated by compiler phases patmat (in the new pattern matcher of 2.10) or explicitouter (in the old pre-2.10 pattern matcher). * * @param name @@ -614,7 +614,7 @@ trait Trees { self: Universe => def unapply(bind: Bind): Option[(Name, Tree)] } - /** + /** * Used to represent `unapply` methods in pattern matching. * * For example: @@ -660,38 +660,6 @@ trait Trees { self: Universe => def unapply(unApply: UnApply): Option[(Tree, List[Tree])] } - /** An array of expressions. This AST node needs to be translated in backend. - * It is used to pass arguments to vararg arguments. - * Introduced by compiler phase uncurry. - */ - type ArrayValue >: Null <: TermTree - - /** A tag that preserves the identity of the `ArrayValue` abstract type from erasure. - * Can be used for pattern matching, instance tests, serialization and likes. - */ - implicit val ArrayValueTag: ClassTag[ArrayValue] - - /** The constructor/deconstructor for `ArrayValue` instances. */ - val ArrayValue: ArrayValueExtractor - - /** An extractor class to create and pattern match with syntax `ArrayValue(elemtpt, elems)`. - * This AST node does not have direct correspondence to Scala code, - * and is used to pass arguments to vararg arguments. For instance: - * - * printf("%s%d", foo, 42) - * - * Is translated to after compiler phase uncurry to: - * - * Apply( - * Ident("printf"), - * Literal("%s%d"), - * ArrayValue(<Any>, List(Ident("foo"), Literal(42)))) - */ - abstract class ArrayValueExtractor { - def apply(elemtpt: Tree, elems: List[Tree]): ArrayValue - def unapply(arrayValue: ArrayValue): Option[(Tree, List[Tree])] - } - /** Anonymous function, eliminated by compiler phase lambdalift */ type Function >: Null <: TermTree with SymTree @@ -705,7 +673,7 @@ trait Trees { self: Universe => /** An extractor class to create and pattern match with syntax `Function(vparams, body)`. * This AST node corresponds to the following Scala code: - * + * * vparams => body * * The symbol of a Function is a synthetic TermSymbol. |