From 5a8b0ab5798704fce6ae7fe8fd7073bd48fd244b Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Wed, 1 Jun 2016 13:55:16 +0200 Subject: [PATCH] don't clone the MIR Rc in every iteration --- src/interpreter.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interpreter.rs b/src/interpreter.rs index bd51e2d2db..c8e6d0bbe1 100644 --- a/src/interpreter.rs +++ b/src/interpreter.rs @@ -186,10 +186,10 @@ impl<'a, 'b, 'mir, 'tcx> FnEvalContext<'a, 'b, 'mir, 'tcx> { fn run(&mut self) -> EvalResult<()> { 'outer: while !self.stack.is_empty() { let mut current_block = self.frame().next_block; + let current_mir = self.mir(); loop { trace!("// {:?}", current_block); - let current_mir = self.mir().clone(); // Cloning a reference. let block_data = current_mir.basic_block_data(current_block); for stmt in &block_data.statements {