summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-08-08 00:07:09 -0700
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-08-08 00:07:09 -0700
commit4185f7fb7a0a8ad4bc05b4ac8317a535ee644b28 (patch)
treea6eba56214b26563768371a1941d3ab2035798aa
parentab1058c31d10d3d4d569cb1d1cdd0a35a2c66902 (diff)
parent0fcec7c91fe697474747a0de246a37c14411ead8 (diff)
downloadscala-4185f7fb7a0a8ad4bc05b4ac8317a535ee644b28.tar.gz
scala-4185f7fb7a0a8ad4bc05b4ac8317a535ee644b28.tar.bz2
scala-4185f7fb7a0a8ad4bc05b4ac8317a535ee644b28.zip
Merge pull request #1043 from magarciaEPFL/fixes210
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 2c7d1a4834..437a5e1434 100644
--- a/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
+++ b/src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala
@@ -728,8 +728,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
@@ -737,12 +736,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
@@ -752,7 +749,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
@@ -771,10 +767,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
}