summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rw-r--r--src/library/scala/LowPriorityImplicits.scala1
-rw-r--r--src/library/scala/Product.scala15
-rw-r--r--src/library/scala/runtime/NonLocalReturnException.scala18
-rw-r--r--src/scalap/scala/tools/scalap/Main.scala15
7 files changed, 7 insertions, 59 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))
diff --git a/src/library/scala/LowPriorityImplicits.scala b/src/library/scala/LowPriorityImplicits.scala
index 1241f642a5..6fdf977dd4 100644
--- a/src/library/scala/LowPriorityImplicits.scala
+++ b/src/library/scala/LowPriorityImplicits.scala
@@ -48,6 +48,7 @@ class LowPriorityImplicits {
}
/** Can go away after next newstarr */
+ /** Caution - not yet. pos/t1459, pos/t2569, jvm/t1342 all fail without the next line. */
def wrapArray[T <: AnyRef](xs: Array[T]): WrappedArray[T] = new WrappedArray.ofRef[T](xs)
def wrapArray(xs: Array[Int]): WrappedArray[Int] = new WrappedArray.ofInt(xs)
def wrapArray(xs: Array[Double]): WrappedArray[Double] = new WrappedArray.ofDouble(xs)
diff --git a/src/library/scala/Product.scala b/src/library/scala/Product.scala
index 18c557e40a..b7dd6cf728 100644
--- a/src/library/scala/Product.scala
+++ b/src/library/scala/Product.scala
@@ -28,21 +28,6 @@ trait Product extends Equals {
*/
def productElement(n: Int): Any
- // !!! This will be disabled pending reimplementation, but it can't be removed
- // until starr forgets about it.
-
- /** Returns the name of the field at the given index from the definition
- * of the class.
- *
- * @param n the index of the element name to return
- * @throws NoSuchElementException if the name data is unavailable for any reason
- * @throws IndexOutOfBoundsException if the index is out of range
- * @return a String representing the field name
- */
- def productElementName(n: Int): String =
- // the method implementation is synthetic - if it is not generated we always throw.
- throw new NoSuchElementException()
-
/** return k for a product <code>A(x_1,...,x_k)</code>
*/
def productArity: Int
diff --git a/src/library/scala/runtime/NonLocalReturnException.scala b/src/library/scala/runtime/NonLocalReturnException.scala
deleted file mode 100644
index e2e39071c2..0000000000
--- a/src/library/scala/runtime/NonLocalReturnException.scala
+++ /dev/null
@@ -1,18 +0,0 @@
-/* __ *\
-** ________ ___ / / ___ Scala API **
-** / __/ __// _ | / / / _ | (c) 2002-2010, LAMP/EPFL **
-** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ **
-** /____/\___/_/ |_/____/_/ | | **
-** |/ **
-\* */
-
-
-
-package scala.runtime
-
-import scala.util.control.ControlThrowable
-
-/** !!! This class has been replaced by NonLocalReturnControl and should be deleted.
- * But, it can't be deleted until starr is updated to use the new name.
- */
-class NonLocalReturnException[T](val key: AnyRef, val value: T) extends ControlThrowable
diff --git a/src/scalap/scala/tools/scalap/Main.scala b/src/scalap/scala/tools/scalap/Main.scala
index 54a3db54c9..88b6c53c46 100644
--- a/src/scalap/scala/tools/scalap/Main.scala
+++ b/src/scalap/scala/tools/scalap/Main.scala
@@ -126,9 +126,6 @@ object Main {
}
}
-
-
-
/**Executes scalap with the given arguments and classpath for the
* class denoted by <code>classname</code>.
*
@@ -157,18 +154,6 @@ object Main {
val clazz = new Classfile(reader)
processJavaClassFile(clazz)
}
- // if the class corresponds to the artificial class scala.All.
- // (to be removed after update of the STARR libraries)
- } else if (classname == "scala.All") {
- Console.println("package scala")
- Console.println("/* Deprecated. Use scala.Nothing instead. */")
- Console.println("sealed abstract class All")
- // if the class corresponds to the artificial class scala.AllRef.
- // (to be removed after update of the STARR libraries)
- } else if (classname == "scala.AllRef") {
- Console.println("package scala")
- Console.println("/* Deprecated. Use scala.Null instead. */")
- Console.println("sealed abstract class AllRef")
// if the class corresponds to the artificial class scala.Any.
// (see member list in class scala.tool.nsc.symtab.Definitions)
} else if (classname == "scala.Any") {