diff options
author | Paul Phillips <paulp@improving.org> | 2012-11-13 08:30:55 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-11-20 14:10:53 -0800 |
commit | 009c57d4622fe69394fe031ad7577a4fdee0b1d9 (patch) | |
tree | 8a3edcf2b3f241069cc2bfc7706eb5cce7f58dcb /src/compiler/scala/tools/nsc/typechecker/Duplicators.scala | |
parent | e5b050814deb2e7e1d6d05511d3a6cb6b013b549 (diff) | |
download | scala-009c57d4622fe69394fe031ad7577a4fdee0b1d9.tar.gz scala-009c57d4622fe69394fe031ad7577a4fdee0b1d9.tar.bz2 scala-009c57d4622fe69394fe031ad7577a4fdee0b1d9.zip |
Removed code from the typechecker.
Removing code from this neighborhood is more difficult than
elsewhere, making it all the more important that it be done.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Duplicators.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Duplicators.scala | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala index 7d58155eb2..9c23b8663c 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala @@ -19,11 +19,6 @@ abstract class Duplicators extends Analyzer { import global._ import definitions.{ AnyRefClass, AnyValClass } - def retyped(context: Context, tree: Tree): Tree = { - resetClassOwners - (newBodyDuplicator(context)).typed(tree) - } - /** Retype the given tree in the given context. Use this method when retyping * a method in a different class. The typer will replace references to the this of * the old class with the new class, and map symbols through the given 'env'. The @@ -42,9 +37,6 @@ abstract class Duplicators extends Analyzer { protected def newBodyDuplicator(context: Context) = new BodyDuplicator(context) - def retypedMethod(context: Context, tree: Tree, oldThis: Symbol, newThis: Symbol): Tree = - (newBodyDuplicator(context)).retypedMethod(tree.asInstanceOf[DefDef], oldThis, newThis) - /** Return the special typer for duplicate method bodies. */ override def newTyper(context: Context): Typer = newBodyDuplicator(context) @@ -186,20 +178,6 @@ abstract class Duplicators extends Analyzer { stats.foreach(invalidate(_, owner)) } - def retypedMethod(ddef: DefDef, oldThis: Symbol, newThis: Symbol): Tree = { - oldClassOwner = oldThis - newClassOwner = newThis - invalidateAll(ddef.tparams) - mforeach(ddef.vparamss) { vdef => - invalidate(vdef) - vdef.tpe = null - } - ddef.symbol = NoSymbol - enterSym(context, ddef) - debuglog("remapping this of " + oldClassOwner + " to " + newClassOwner) - typed(ddef) - } - /** Optionally cast this tree into some other type, if required. * Unless overridden, just returns the tree. */ |