diff options
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ICodeReader.scala | 9 |
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 } |