summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Garcia <miguelalfredo.garcia@epfl.ch>2012-07-07 18:33:47 +0200
committerMiguel Garcia <miguelalfredo.garcia@epfl.ch>2012-08-02 21:30:47 +0200
commit0fcec7c91fe697474747a0de246a37c14411ead8 (patch)
tree36cd5421714165a95d98d833457bd4e1a39a9e54
parent937da62be2834a646a31dbfb01527a82672f111e (diff)
downloadscala-0fcec7c91fe697474747a0de246a37c14411ead8.tar.gz
scala-0fcec7c91fe697474747a0de246a37c14411ead8.tar.bz2
scala-0fcec7c91fe697474747a0de246a37c14411ead8.zip
updating resolveDups() to use MethodTFA.mutatingInterpret()
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
index bb9f9bde98..ecd1a3918a 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
@@ -725,8 +725,7 @@ abstract class ICodeReader extends ClassfileParser {
import analysis.typeFlowLattice.IState
/** Abstract interpretation for one instruction. */
- override def interpret(in: typeFlowLattice.Elem, i: Instruction): typeFlowLattice.Elem = {
- var out = IState(new VarBinding(in.vars), new TypeStack(in.stack))
+ override def mutatingInterpret(out: typeFlowLattice.Elem, i: Instruction): typeFlowLattice.Elem = {
val bindings = out.vars
val stack = out.stack
import stack.push
@@ -734,12 +733,10 @@ abstract class ICodeReader extends ClassfileParser {
case DUP_X1 =>
val (one, two) = stack.pop2
push(one); push(two); push(one);
- out = IState(bindings, stack)
case DUP_X2 =>
val (one, two, three) = stack.pop3
push(one); push(three); push(two); push(one);
- out = IState(bindings, stack)
case DUP2_X1 =>
val (one, two) = stack.pop2
@@ -749,7 +746,6 @@ abstract class ICodeReader extends ClassfileParser {
val three = stack.pop
push(two); push(one); push(three); push(two); push(one);
}
- out = IState(bindings, stack)
case DUP2_X2 =>
val (one, two) = stack.pop2
@@ -768,10 +764,9 @@ abstract class ICodeReader extends ClassfileParser {
push(two); push(one); push(four); push(one); push(three); push(two); push(one);
}
}
- out = IState(bindings, stack)
case _ =>
- out = super.interpret(in, i)
+ super.mutatingInterpret(out, i)
}
out
}