diff options
author | Paul Phillips <paulp@improving.org> | 2012-11-03 06:29:38 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-11-03 07:01:15 -0700 |
commit | 9c09c170998f74fba03990977b285e3121db32a6 (patch) | |
tree | ee12a85233e6927e5ec3698fc83f26fb46ad43e6 /src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala | |
parent | d3da3ef83293c0e174e07aba643b3a1f46c110c5 (diff) | |
download | scala-9c09c170998f74fba03990977b285e3121db32a6.tar.gz scala-9c09c170998f74fba03990977b285e3121db32a6.tar.bz2 scala-9c09c170998f74fba03990977b285e3121db32a6.zip |
Removing unused locals and making vars into vals.
According to "git diff" the difference from master to this
commit includes:
Minus: 112 vals, 135 vars
Plus: 165 vals, 2 vars
Assuming all the removed ones were vals, which is true from 10K feet,
it suggests I removed 80 unused vals and turned 133 vars into vals.
There are a few other -Xlint driven improvements bundled with this,
like putting double-parentheses around Some((x, y)) so it doesn't
trigger the "adapting argument list" warning.
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala index b286f52280..5af6786002 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala @@ -33,7 +33,6 @@ abstract class ICodeReader extends ClassfileParser { * for non-static members. */ def readClass(cls: Symbol): (IClass, IClass) = { - var classFile: io.AbstractFile = null; cls.info // ensure accurate type information isScalaModule = cls.isModule && !cls.isJavaDefined @@ -58,11 +57,9 @@ abstract class ICodeReader extends ClassfileParser { override def parseClass() { this.instanceCode = new IClass(clazz) this.staticCode = new IClass(staticModule) - val jflags = in.nextChar - val isAttribute = (jflags & JAVA_ACC_ANNOTATION) != 0 - val sflags = toScalaClassFlags(jflags) // what, this is never used?? - val c = pool getClassSymbol in.nextChar + in.nextChar + pool getClassSymbol in.nextChar parseInnerClasses() in.skip(2) // super class @@ -125,7 +122,7 @@ abstract class ICodeReader extends ClassfileParser { override def parseMethod() { val (jflags, sym) = parseMember(false) - var beginning = in.bp + val beginning = in.bp try { if (sym != NoSymbol) { this.method = new IMethod(sym) @@ -669,7 +666,6 @@ abstract class ICodeReader extends ClassfileParser { val blocks = makeBasicBlocks var otherBlock: BasicBlock = NoBasicBlock - var disableJmpTarget = false for ((pc, instr) <- instrs.iterator) { // Console.println("> " + pc + ": " + instr); @@ -724,7 +720,6 @@ abstract class ICodeReader extends ClassfileParser { /** Abstract interpretation for one instruction. */ override def mutatingInterpret(out: typeFlowLattice.Elem, i: Instruction): typeFlowLattice.Elem = { - val bindings = out.vars val stack = out.stack import stack.push i match { |