summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/backend/icode/Members.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-11-12 23:21:47 -0800
committerPaul Phillips <paulp@improving.org>2012-11-19 11:53:44 -0800
commit645c2676dd6699ac24a57dfe750386bbdb827ee8 (patch)
tree8a7391c27b58da5ef5529ce17ce3b1f3178a21e9 /src/compiler/scala/tools/nsc/backend/icode/Members.scala
parent345f937b3441f248ac9156484758fa17b1a78941 (diff)
downloadscala-645c2676dd6699ac24a57dfe750386bbdb827ee8.tar.gz
scala-645c2676dd6699ac24a57dfe750386bbdb827ee8.tar.bz2
scala-645c2676dd6699ac24a57dfe750386bbdb827ee8.zip
Commenting out unused members.
I want to get this commit into the history because the tests pass here, which demonstrates that every commented out method is not only unnecessary internally but has zero test coverage. Since I know (based on the occasional source code comment, or more often based on knowing something about other source bases) that some of these can't be removed without breaking other things, I want to at least record a snapshot of the identities of all these unused and untested methods. This commit will be reverted; then there will be another commit which removes the subset of these methods which I believe to be removable. The remainder are in great need of tests which exercise the interfaces upon which other repositories depend.
Diffstat (limited to 'src/compiler/scala/tools/nsc/backend/icode/Members.scala')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/Members.scala50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/Members.scala b/src/compiler/scala/tools/nsc/backend/icode/Members.scala
index 07abe9d74f..4192d794f9 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/Members.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/Members.scala
@@ -126,9 +126,9 @@ trait Members {
override def toString() = symbol.fullName
- def lookupField(s: Symbol) = fields find (_.symbol == s)
+ // def lookupField(s: Symbol) = fields find (_.symbol == s)
def lookupMethod(s: Symbol) = methods find (_.symbol == s)
- def lookupMethod(s: Name) = methods find (_.symbol.name == s)
+ // def lookupMethod(s: Name) = methods find (_.symbol.name == s)
/* returns this methods static ctor if it has one. */
def lookupStaticCtor: Option[IMethod] = methods find (_.symbol.isStaticConstructor)
@@ -159,7 +159,7 @@ trait Members {
def linearizedBlocks(lin: Linearizer = self.linearizer): List[BasicBlock] = lin linearize this
def foreachBlock[U](f: BasicBlock => U): Unit = blocks foreach f
- def foreachInstr[U](f: Instruction => U): Unit = foreachBlock(_.toList foreach f)
+ // def foreachInstr[U](f: Instruction => U): Unit = foreachBlock(_.toList foreach f)
var native = false
@@ -192,7 +192,7 @@ trait Members {
}
def addLocals(ls: List[Local]) = ls foreach addLocal
- def addParams(as: List[Local]) = as foreach addParam
+ // def addParams(as: List[Local]) = as foreach addParam
def lookupLocal(n: Name): Option[Local] = locals find (_.sym.name == n)
def lookupLocal(sym: Symbol): Option[Local] = locals find (_.sym == sym)
@@ -207,28 +207,28 @@ trait Members {
override def toString() = symbol.fullName
- def matchesSignature(other: IMethod) = {
- (symbol.name == other.symbol.name) &&
- (params corresponds other.params)(_.kind == _.kind) &&
- (returnType == other.returnType)
- }
+ // def matchesSignature(other: IMethod) = {
+ // (symbol.name == other.symbol.name) &&
+ // (params corresponds other.params)(_.kind == _.kind) &&
+ // (returnType == other.returnType)
+ // }
import opcodes._
- def checkLocals(): Unit = {
- def localsSet = (code.blocks flatMap { bb =>
- bb.iterator collect {
- case LOAD_LOCAL(l) => l
- case STORE_LOCAL(l) => l
- }
- }).toSet
-
- if (hasCode) {
- log("[checking locals of " + this + "]")
- locals filterNot localsSet foreach { l =>
- log("Local " + l + " is not declared in " + this)
- }
- }
- }
+ // def checkLocals(): Unit = {
+ // def localsSet = (code.blocks flatMap { bb =>
+ // bb.iterator collect {
+ // case LOAD_LOCAL(l) => l
+ // case STORE_LOCAL(l) => l
+ // }
+ // }).toSet
+
+ // if (hasCode) {
+ // log("[checking locals of " + this + "]")
+ // locals filterNot localsSet foreach { l =>
+ // log("Local " + l + " is not declared in " + this)
+ // }
+ // }
+ // }
/** Merge together blocks that have a single successor which has a
* single predecessor. Exception handlers are taken into account (they
@@ -295,7 +295,7 @@ trait Members {
var start: Int = _
/** Ending PC for this local's visibility range. */
- var end: Int = _
+ // var end: Int = _
/** PC-based ranges for this local variable's visibility */
var ranges: List[(Int, Int)] = Nil