diff options
author | Erik Osheim <d_m@plastic-idolatry.com> | 2012-08-13 12:04:14 -0400 |
---|---|---|
committer | Erik Osheim <d_m@plastic-idolatry.com> | 2012-08-13 15:31:57 -0400 |
commit | 97ae6f6f72dba8d6d911ad3c8dae4da679aeb586 (patch) | |
tree | 8aad8f8662c36d993dc6b8bc0cac9920cb26fab3 /src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala | |
parent | 8cfba0fb219a49cceeb0318a6562aa3a602d913c (diff) | |
download | scala-97ae6f6f72dba8d6d911ad3c8dae4da679aeb586.tar.gz scala-97ae6f6f72dba8d6d911ad3c8dae4da679aeb586.tar.bz2 scala-97ae6f6f72dba8d6d911ad3c8dae4da679aeb586.zip |
Move side-effecting call out of debuglog(). Fixes SI-6223.
This change fixes a situation in which method calls aren't being properly
specialized. All the existing tests pass; in addition, it likely fixes other
specialization bugs (and improves performance of specialized code).
Also includes a small regression test.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala index 005d26e119..db97308f41 100644 --- a/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala +++ b/src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala @@ -652,11 +652,10 @@ abstract class SpecializeTypes extends InfoTransform with TypingTransformers { info(specMember) = Implementation(original) typeEnv(specMember) = env ++ typeEnv(m) - } - else debuglog({ + } else { val om = forwardToOverload(m) - "normalizedMember " + m + " om: " + om + " " + pp(typeEnv(om)) - }) + debuglog("normalizedMember " + m + " om: " + om + " " + pp(typeEnv(om))) + } } else debuglog("conflicting env for " + m + " env: " + env) |