summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-05-24 00:04:05 +0000
committerPaul Phillips <paulp@improving.org>2010-05-24 00:04:05 +0000
commit67a650205b9f18f58063883dc6150009f8bdaae3 (patch)
treeba8c28e5bfe10aabf1f2fb4e3ebc731097edf8ff /src/compiler
parenta33ef273d057c043d4129927f27230f54051ac88 (diff)
downloadscala-67a650205b9f18f58063883dc6150009f8bdaae3.tar.gz
scala-67a650205b9f18f58063883dc6150009f8bdaae3.tar.bz2
scala-67a650205b9f18f58063883dc6150009f8bdaae3.zip
Removed a few instances of redundant or dead co...
Removed a few instances of redundant or dead code, most of which was marked as waiting for a new starr which has long since arrived. No review.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/Definitions.scala9
-rw-r--r--src/compiler/scala/tools/nsc/symtab/StdNames.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala6
3 files changed, 6 insertions, 11 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
index 7857fa35d5..597a34c773 100644
--- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala
+++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala
@@ -7,8 +7,9 @@ package scala.tools.nsc
package symtab
import scala.collection.mutable.{HashMap, HashSet}
-import scala.tools.nsc.util.{Position, NoPosition}
+import scala.tools.nsc.util.NoPosition
import Flags._
+import PartialFunction._
trait Definitions extends reflect.generic.StandardDefinitions {
self: SymbolTable =>
@@ -16,12 +17,6 @@ trait Definitions extends reflect.generic.StandardDefinitions {
object definitions extends AbsDefinitions {
def isDefinitionsInitialized = isInitialized
- // Working around bug #2133
- private object definitionHelpers {
- def cond[T](x: T)(f: PartialFunction[T, Boolean]) = (f isDefinedAt x) && f(x)
- }
- import definitionHelpers._
-
// symbols related to packages
var emptypackagescope: Scope = null //debug
diff --git a/src/compiler/scala/tools/nsc/symtab/StdNames.scala b/src/compiler/scala/tools/nsc/symtab/StdNames.scala
index 2a88330fa8..ed72fc16fa 100644
--- a/src/compiler/scala/tools/nsc/symtab/StdNames.scala
+++ b/src/compiler/scala/tools/nsc/symtab/StdNames.scala
@@ -329,7 +329,7 @@ trait StdNames extends reflect.generic.StdNames { self: SymbolTable =>
val print = newTermName("print")
val productArity = newTermName("productArity")
val productElement = newTermName("productElement")
- val productElementName = newTermName("productElementName")
+ // val productElementName = newTermName("productElementName")
val productPrefix = newTermName("productPrefix")
val readResolve = newTermName("readResolve")
val sameElements = newTermName("sameElements")
diff --git a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala
index 6ef9122b1d..f33e3506fd 100644
--- a/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/SyntheticMethods.scala
@@ -87,7 +87,7 @@ trait SyntheticMethods extends ast.TreeDSL {
typer typed { DEF(method) === LIT(nargs) }
}
- /** Common code for productElement and productElementName
+ /** Common code for productElement and (currently disabled) productElementName
*/
def perElementMethod(accs: List[Symbol], methodName: Name, resType: Type, caseFn: Symbol => Tree): Tree = {
val symToTpe = makeTypeConstructor(List(IntClass.tpe), resType)
@@ -107,8 +107,8 @@ trait SyntheticMethods extends ast.TreeDSL {
def productElementMethod(accs: List[Symbol]): Tree =
perElementMethod(accs, nme.productElement, AnyClass.tpe, x => Ident(x))
- def productElementNameMethod(accs: List[Symbol]): Tree =
- perElementMethod(accs, nme.productElementName, StringClass.tpe, x => Literal(x.name.toString))
+ // def productElementNameMethod(accs: List[Symbol]): Tree =
+ // perElementMethod(accs, nme.productElementName, StringClass.tpe, x => Literal(x.name.toString))
def moduleToStringMethod: Tree = {
val method = syntheticMethod(nme.toString_, FINAL, makeNoArgConstructor(StringClass.tpe))