summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
diff options
context:
space:
mode:
authorAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2011-03-07 14:24:02 +0000
committerAleksandar Pokopec <aleksandar.prokopec@epfl.ch>2011-03-07 14:24:02 +0000
commitb8c12031219e898d7e1b0750c37f6856b157da0e (patch)
treef5da5f48ec2d948263cf78a248044c52bbaafd2b /src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
parent02e043c776114af40ce329a1b8741f9ae6bc5c8c (diff)
downloadscala-b8c12031219e898d7e1b0750c37f6856b157da0e.tar.gz
scala-b8c12031219e898d7e1b0750c37f6856b157da0e.tar.bz2
scala-b8c12031219e898d7e1b0750c37f6856b157da0e.zip
Fixes and closes #4013.
No review.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
index da89fd6be5..6673560b89 100644
--- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
+++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
@@ -536,7 +536,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
}
var parents = List(applyContext(atPhase(currentRun.typerPhase)(clazz.tpe)))
- log("Parent: " + parents.head + ", sym: " + parents.head.typeSymbol)
+ // log("Parent: " + parents.head + ", sym: " + parents.head.typeSymbol)
if (parents.head.typeSymbol.isTrait)
parents = parents.head.parents.head :: parents
val extraSpecializedMixins = specializedParents(clazz.info.parents.map(applyContext))
@@ -545,7 +545,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
if (newClassTParams.isEmpty) infoType else PolyType(newClassTParams, infoType)
}
- log("specializedClass " + cls + ": " + specializedInfoType)
+ // log("specializedClass " + cls + ": " + specializedInfoType)
atPhase(phase.next)(cls.setInfo(specializedInfoType))
val fullEnv = outerEnv ++ env
@@ -732,16 +732,16 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
//log("decls before: " + decls1 + ", overloads: " + overloads.mkString("\n"))
var hasSubclasses = false
- log("For " + clazz + " - " + specializations(clazz.info.typeParams))
+ // log("For " + clazz + " - " + specializations(clazz.info.typeParams))
for (env <- specializations(clazz.info.typeParams) if satisfiable(env)) {
val spc = specializedClass(env, decls1)
- log("entered " + spc + " in " + clazz.owner)
+ // log("entered " + spc + " in " + clazz.owner)
hasSubclasses = true
val existing = clazz.owner.info.decl(spc.name)
// a symbol for the specialized class already exists if there's a classfile for it.
// keeping both crashes the compiler on test/files/pos/spec-Function1.scala
if (existing != NoSymbol) {
- log("removing existing symbol for "+ existing)
+ // log("removing existing symbol for "+ existing)
clazz.owner.info.decls.unlink(existing)
}
@@ -1227,7 +1227,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
override def traverse(tree: Tree) = tree match {
case DefDef(mods, name, tparams, vparamss, tpt, rhs) =>
if (concreteSpecMethods(tree.symbol) || tree.symbol.isConstructor) {
- //if (settings.debug.value)
+ if (settings.debug.value)
log("!!! adding body of a defdef %s, symbol %s: %s".format(tree, tree.symbol, rhs))
body(tree.symbol) = rhs
// body(tree.symbol) = tree // whole method
@@ -1237,7 +1237,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
case ValDef(mods, name, tpt, rhs) if concreteSpecMethods(tree.symbol) =>
body(tree.symbol) = rhs
- log("!!! adding body of a valdef " + tree.symbol + ": " + rhs)
+ // log("!!! adding body of a valdef " + tree.symbol + ": " + rhs)
//super.traverse(tree)
case _ =>
super.traverse(tree)
@@ -1392,7 +1392,7 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers {
atOwner(currentOwner)(transformTrees(body ::: specMembers)))
case ddef @ DefDef(mods, name, tparams, vparamss, tpt, rhs) if info.isDefinedAt(symbol) =>
- log("--> method: " + ddef + " in " + ddef.symbol.owner + ", " + info(symbol))
+ // log("--> method: " + ddef + " in " + ddef.symbol.owner + ", " + info(symbol))
if (symbol.isConstructor) {
val t = atOwner(symbol) {