diff options
author | Paul Phillips <paulp@improving.org> | 2009-07-16 12:42:49 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-07-16 12:42:49 +0000 |
commit | 818a8f4c081b9ea451cf906f016e52f692cbe733 (patch) | |
tree | ab31e12d66cd7d904adb81c315eb8fdbe46d2061 /src | |
parent | b9be89ebdaba528a7590c2be2463c58ce1652dab (diff) | |
download | scala-818a8f4c081b9ea451cf906f016e52f692cbe733.tar.gz scala-818a8f4c081b9ea451cf906f016e52f692cbe733.tar.bz2 scala-818a8f4c081b9ea451cf906f016e52f692cbe733.zip |
Two small performance fixes which shaved 40 sec...
Two small performance fixes which shaved 40 seconds off clean->test
time.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/Constants.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Constants.scala b/src/compiler/scala/tools/nsc/symtab/Constants.scala index 584eb65fdf..2231aa32e9 100644 --- a/src/compiler/scala/tools/nsc/symtab/Constants.scala +++ b/src/compiler/scala/tools/nsc/symtab/Constants.scala @@ -74,7 +74,7 @@ trait Constants { * @return ... */ override def equals(other: Any): Boolean = other match { - case that: Constant => this.value == that.value && this.tag == that.tag + case that: Constant => this.tag == that.tag && this.value == that.value case _ => false } diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index c4cfa2af53..9f042e5aa7 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -13,7 +13,7 @@ import scala.collection.immutable.{Map, ListMap} import scala.collection.mutable.{ListBuffer, ArrayBuffer} import scala.tools.nsc.io.AbstractFile import scala.tools.nsc.util.{Position, NoPosition} - +import scala.annotation.switch /** This abstract class implements a class file parser. * @@ -126,7 +126,7 @@ abstract class ClassfileParser { while (i < starts.length) { starts(i) = in.bp i += 1 - in.nextByte match { + (in.nextByte.toInt: @switch) match { case CONSTANT_UTF8 | CONSTANT_UNICODE => in.skip(in.nextChar) case CONSTANT_CLASS | CONSTANT_STRING => |