don't clone the MIR Rc in every iteration
This commit is contained in:
parent
8398781132
commit
5a8b0ab579
1 changed files with 1 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue