summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-11-18 05:41:16 +0000
committerPaul Phillips <paulp@improving.org>2009-11-18 05:41:16 +0000
commit7bad13f1799234ef8ebdde07f304319d4fd035d2 (patch)
tree46eb278d56028a0018bc514f6f3e44c2dd4422e0 /src/compiler
parent6a23aa029bb78aa6f769b3daab71bb8330af5f3f (diff)
downloadscala-7bad13f1799234ef8ebdde07f304319d4fd035d2.tar.gz
scala-7bad13f1799234ef8ebdde07f304319d4fd035d2.tar.bz2
scala-7bad13f1799234ef8ebdde07f304319d4fd035d2.zip
More deprecation work.
since 2.7.2 (still except for lower case primitive type aliases) and removes every deprecated method which has never shipped in a release.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/ast/Trees.scala6
-rw-r--r--src/compiler/scala/tools/nsc/matching/ParallelMatching.scala33
2 files changed, 18 insertions, 21 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/Trees.scala b/src/compiler/scala/tools/nsc/ast/Trees.scala
index e4dfb14833..435713d82c 100644
--- a/src/compiler/scala/tools/nsc/ast/Trees.scala
+++ b/src/compiler/scala/tools/nsc/ast/Trees.scala
@@ -630,7 +630,7 @@ trait Trees {
}})
val (edefs, rest) = body span treeInfo.isEarlyDef
val (evdefs, etdefs) = edefs partition treeInfo.isEarlyValDef
- val (lvdefs, gvdefs) = List.unzip {
+ val (lvdefs, gvdefs) =
evdefs map {
case vdef @ ValDef(mods, name, tpt, rhs) =>
val fld = treeCopy.ValDef(
@@ -639,8 +639,8 @@ trait Trees {
EmptyTree)
val local = treeCopy.ValDef(vdef, Modifiers(PRESUPER), name, tpt, rhs)
(local, fld)
- }
- }
+ } unzip
+
val constrs = {
if (constrMods.isTrait) {
if (body forall treeInfo.isInterfaceMember) List()
diff --git a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
index d87eb29cf1..710311a627 100644
--- a/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
+++ b/src/compiler/scala/tools/nsc/matching/ParallelMatching.scala
@@ -454,17 +454,17 @@ trait ParallelMatching extends ast.TreeDSL
private lazy val rowsplit = {
require(scrut.tpe <:< head.tpe)
- List.unzip(
- for ((c, rows) <- pmatch pzip rest.rows) yield {
- def canSkip = pivot canSkipSubsequences c
- def passthrough(skip: Boolean) = if (skip) None else Some(rows insert c)
-
- pivot.subsequences(c, scrut.seqType) match {
- case Some(ps) => (Some(rows insert ps), passthrough(canSkip))
- case None => (None, passthrough(false))
- }
+ val res = for ((c, rows) <- pmatch pzip rest.rows) yield {
+ def canSkip = pivot canSkipSubsequences c
+ def passthrough(skip: Boolean) = if (skip) None else Some(rows insert c)
+
+ pivot.subsequences(c, scrut.seqType) match {
+ case Some(ps) => (Some(rows insert ps), passthrough(canSkip))
+ case None => (None, passthrough(false))
}
- ) match { case (l1, l2) => (l1.flatten, l2.flatten) }
+ }
+
+ res.unzip match { case (l1, l2) => (l1.flatten, l2.flatten) }
}
lazy val cond = (pivot precondition pmatch).get // length check
@@ -511,8 +511,8 @@ trait ParallelMatching extends ast.TreeDSL
case class Yes(bx: Int, moreSpecific: Pattern, subsumed: List[Pattern])
case class No(bx: Int, remaining: Pattern)
- val (yeses, noes) : (List[Yes], List[No]) = List.unzip(
- for ((pattern, j) <- pmatch.pzip()) yield {
+ val (yeses, noes) : (List[Yes], List[No]) =
+ (for ((pattern, j) <- pmatch.pzip()) yield {
// scrutinee, head of pattern group
val (s, p) = (pattern.tpe, head.necessaryType)
@@ -539,8 +539,7 @@ trait ParallelMatching extends ast.TreeDSL
case x if x.isDefault || pMatchesS => (passl(), passr)
case _ => (None, passr)
}) : (Option[Yes], Option[No])
- }
- ) match { case (x,y) => (x.flatten, y.flatten) }
+ }).unzip match { case (x,y) => (x.flatten, y.flatten) }
val moreSpecific = yeses map (_.moreSpecific)
val subsumed = yeses map (x => (x.bx, x.subsumed))
@@ -739,12 +738,10 @@ trait ParallelMatching extends ast.TreeDSL
/** Cut out the column containing the non-default pattern. */
class Cut(index: Int) {
/** The first two separate out the 'i'th pattern in each row from the remainder. */
- private val (_column, _rows) =
- List.unzip(rows map (_ extractColumn index))
+ private val (_column, _rows) = rows map (_ extractColumn index) unzip
/** Now the 'i'th tvar is separated out and used as a new Scrutinee. */
- private val (_pv, _tvars) =
- tvars extractIndex index
+ private val (_pv, _tvars) = tvars extractIndex index
/** The non-default pattern (others.head) replaces the column head. */
private val (_ncol, _nrep) =