diff options
author | Paul Phillips <paulp@improving.org> | 2011-08-08 06:56:21 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-08-08 06:56:21 +0000 |
commit | 8b28292b5379a34fad0599335116b9e54ee44e20 (patch) | |
tree | 654c93a14a26e802948aa80664efb7aea7b448d3 /src/compiler | |
parent | be31934db38a93468b6390e783ca377da6283c19 (diff) | |
download | scala-8b28292b5379a34fad0599335116b9e54ee44e20.tar.gz scala-8b28292b5379a34fad0599335116b9e54ee44e20.tar.bz2 scala-8b28292b5379a34fad0599335116b9e54ee44e20.zip |
Fixing all the tests and source which still use...
Fixing all the tests and source which still use the old for
comprehension syntax with vals where there are no vals and no vals where
there are vals. No review.
Diffstat (limited to 'src/compiler')
5 files changed, 12 insertions, 14 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala index 81962f89d8..4a2d8e9f08 100644 --- a/src/compiler/scala/reflect/internal/Types.scala +++ b/src/compiler/scala/reflect/internal/Types.scala @@ -5645,7 +5645,7 @@ A type's typeSymbol should never be inspected directly. try { globalGlbDepth += 1 val dss = ts flatMap refinedToDecls - for (ds <- dss; val sym <- ds.iterator) + for (ds <- dss; sym <- ds.iterator) if (globalGlbDepth < globalGlbLimit && !(glbThisType specializes sym)) try { addMember(glbThisType, glbRefined, glbsym(sym)) diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/Liveness.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/Liveness.scala index 97da13abfc..a82e81b858 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/analysis/Liveness.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/Liveness.scala @@ -34,7 +34,6 @@ abstract class Liveness { final class LivenessAnalysis extends DataFlowAnalysis[livenessLattice.type] { type P = BasicBlock val lattice = livenessLattice - var method: IMethod = _ val gen: mutable.Map[BasicBlock, Set[Local]] = perRunCaches.newMap() @@ -42,11 +41,10 @@ abstract class Liveness { def init(m: IMethod) { this.method = m - gen.clear - kill.clear + gen.clear() + kill.clear() - for (b <- m.code.blocks; - (g, k) = genAndKill(b)) { + for (b <- m.code.blocks; val (g, k) = genAndKill(b)) { gen += (b -> g) kill += (b -> k) } diff --git a/src/compiler/scala/tools/nsc/backend/icode/analysis/ReachingDefinitions.scala b/src/compiler/scala/tools/nsc/backend/icode/analysis/ReachingDefinitions.scala index cc4619c68f..09718947f4 100644 --- a/src/compiler/scala/tools/nsc/backend/icode/analysis/ReachingDefinitions.scala +++ b/src/compiler/scala/tools/nsc/backend/icode/analysis/ReachingDefinitions.scala @@ -75,12 +75,13 @@ abstract class ReachingDefinitions { def init(m: IMethod) { this.method = m - gen.clear; kill.clear - drops.clear; outStack.clear - for (b <- m.code.blocks.toList; - (g, k) = genAndKill(b); - (d, st) = dropsAndGen(b)) { + gen.clear() + kill.clear() + drops.clear() + outStack.clear() + + for (b <- m.code.blocks.toList; val (g, k) = genAndKill(b); val (d, st) = dropsAndGen(b)) { gen += (b -> g) kill += (b -> k) drops += (b -> d) @@ -96,7 +97,6 @@ abstract class ReachingDefinitions { m.exh foreach { e => in(e.startBlock) = lattice.IState(new ListSet[Definition], List(new ListSet[(BasicBlock, Int)])) } - } } diff --git a/src/compiler/scala/tools/nsc/transform/Mixin.scala b/src/compiler/scala/tools/nsc/transform/Mixin.scala index d43dfdd3d9..81d7e8b373 100644 --- a/src/compiler/scala/tools/nsc/transform/Mixin.scala +++ b/src/compiler/scala/tools/nsc/transform/Mixin.scala @@ -856,7 +856,7 @@ abstract class Mixin extends InfoTransform with ast.TreeDSL { */ def addCheckedGetters(clazz: Symbol, stats: List[Tree]): List[Tree] = { - val stats1 = for (stat <- stats; sym = stat.symbol) yield stat match { + val stats1 = for (stat <- stats; val sym = stat.symbol) yield stat match { case DefDef(mods, name, tp, vp, tpt, rhs) if sym.isLazy && rhs != EmptyTree && !clazz.isImplClass => assert(fieldOffset.isDefinedAt(sym)) diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala index 35a736d34e..f4a7ad678a 100644 --- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala +++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala @@ -1512,7 +1512,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { val (oldtparams, newtparams) = reskolemize(tparams) // create fresh symbols for value parameters to hold the skolem types - val vparamss1 = List(for (vdef <- vparamss.head; param = vdef.symbol) yield { + val vparamss1 = List(for (vdef <- vparamss.head; val param = vdef.symbol) yield { ValDef(param.cloneSymbol(symbol).setInfo(param.info.substSym(oldtparams, newtparams))) }) |