summaryrefslogtreecommitdiff
path: root/src/compiler/scala/reflect/internal/Types.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-07-23 22:50:46 +0000
committerPaul Phillips <paulp@improving.org>2011-07-23 22:50:46 +0000
commitc3c1c65d5fa2a6fd94e8f3bda7c5b4b5408bb789 (patch)
tree59302a13061022c78058c65d41774bb94983f8d9 /src/compiler/scala/reflect/internal/Types.scala
parent5c61410fe5b8fd636bde6484f04a2d1160ed7eb4 (diff)
downloadscala-c3c1c65d5fa2a6fd94e8f3bda7c5b4b5408bb789.tar.gz
scala-c3c1c65d5fa2a6fd94e8f3bda7c5b4b5408bb789.tar.bz2
scala-c3c1c65d5fa2a6fd94e8f3bda7c5b4b5408bb789.zip
Since trunk seems to be undergoing all kinds of...
Since trunk seems to be undergoing all kinds of changes of the sort which touch lots of files, the time is ripe for various search/replace improvements which have stacked up. This one is the replacement of all "if (settings.debug.value) log" with "debuglog" since as noted in a recent commit, the inliner will take care of that for you. No review.
Diffstat (limited to 'src/compiler/scala/reflect/internal/Types.scala')
-rw-r--r--src/compiler/scala/reflect/internal/Types.scala18
1 files changed, 8 insertions, 10 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala
index 358258390f..2c626013b3 100644
--- a/src/compiler/scala/reflect/internal/Types.scala
+++ b/src/compiler/scala/reflect/internal/Types.scala
@@ -4034,14 +4034,13 @@ A type's typeSymbol should never be inspected directly.
def corresponds(sym1: Symbol, sym2: Symbol): Boolean =
sym1.name == sym2.name && (sym1.isPackageClass || corresponds(sym1.owner, sym2.owner))
if (!corresponds(sym.owner, rebind0.owner)) {
- if (settings.debug.value)
- log("ADAPT1 pre = "+pre+", sym = "+sym+sym.locationString+", rebind = "+rebind0+rebind0.locationString)
+ debuglog("ADAPT1 pre = "+pre+", sym = "+sym+sym.locationString+", rebind = "+rebind0+rebind0.locationString)
val bcs = pre.baseClasses.dropWhile(bc => !corresponds(bc, sym.owner));
if (bcs.isEmpty)
assert(pre.typeSymbol.isRefinementClass, pre) // if pre is a refinementclass it might be a structural type => OK to leave it in.
else
rebind0 = pre.baseType(bcs.head).member(sym.name)
- if (settings.debug.value) log(
+ debuglog(
"ADAPT2 pre = " + pre +
", bcs.head = " + bcs.head +
", sym = " + sym+sym.locationString +
@@ -4053,7 +4052,7 @@ A type's typeSymbol should never be inspected directly.
}
val rebind = rebind0.suchThat(sym => sym.isType || sym.isStable)
if (rebind == NoSymbol) {
- if (settings.debug.value) log("" + phase + " " +phase.flatClasses+sym.owner+sym.name+" "+sym.isType)
+ debuglog("" + phase + " " +phase.flatClasses+sym.owner+sym.name+" "+sym.isType)
throw new MalformedType(pre, sym.nameString)
}
rebind
@@ -5684,7 +5683,7 @@ A type's typeSymbol should never be inspected directly.
* of types.
*/
private def commonOwner(tps: List[Type]): Symbol = {
- // if (settings.debug.value) log("computing common owner of types " + tps)//DEBUG
+ // debuglog("computing common owner of types " + tps)//DEBUG
commonOwnerMap.init
tps foreach { tp => commonOwnerMap.apply(tp); () }
commonOwnerMap.result
@@ -5748,7 +5747,7 @@ A type's typeSymbol should never be inspected directly.
case ex: MalformedType => None
case ex: IndexOutOfBoundsException => // transpose freaked out because of irregular argss
// catching just in case (shouldn't happen, but also doesn't cost us)
- if (settings.debug.value) log("transposed irregular matrix!?"+ (tps, argss))
+ debuglog("transposed irregular matrix!?"+ (tps, argss))
None
}
case SingleType(_, sym) :: rest =>
@@ -5770,7 +5769,7 @@ A type's typeSymbol should never be inspected directly.
*/
def addMember(thistp: Type, tp: Type, sym: Symbol) {
assert(sym != NoSymbol)
- // if (settings.debug.value) log("add member " + sym+":"+sym.info+" to "+thistp) //DEBUG
+ // debuglog("add member " + sym+":"+sym.info+" to "+thistp) //DEBUG
if (!(thistp specializes sym)) {
if (sym.isTerm)
for (alt <- tp.nonPrivateDecl(sym.name).alternatives)
@@ -5909,7 +5908,7 @@ A type's typeSymbol should never be inspected directly.
if (!(declaredBoundsInst <:< argumentBounds))
stricterBound(hkarg, hkparam)
- if (settings.debug.value) log(
+ debuglog(
"checkKindBoundsHK base case: " + hkparam +
" declared bounds: " + declaredBounds +
" after instantiating earlier hkparams: " + declaredBoundsInst + "\n" +
@@ -5918,8 +5917,7 @@ A type's typeSymbol should never be inspected directly.
)
}
else {
- if (settings.debug.value)
- log("checkKindBoundsHK recursing to compare params of "+ hkparam +" with "+ hkarg)
+ debuglog("checkKindBoundsHK recursing to compare params of "+ hkparam +" with "+ hkarg)
val (am, vm, sb) = checkKindBoundsHK(
hkarg.typeParams,
hkarg,