Skip to content

Commit

Permalink
don't clone the MIR Rc in every iteration
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Jun 1, 2016
1 parent 8398781 commit 5a8b0ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/interpreter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5a8b0ab

Please sign in to comment.