From 0fcec7c91fe697474747a0de246a37c14411ead8 Mon Sep 17 00:00:00 2001 From: Miguel Garcia Date: Sat, 7 Jul 2012 18:33:47 +0200 Subject: updating resolveDups() to use MethodTFA.mutatingInterpret() --- src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala | 9 ++------- 1 file 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 } -- cgit v1.2.3