don't clone the MIR Rc in every iteration
This commit is contained in:
parent
8398781132
commit
5a8b0ab579
@ -186,10 +186,10 @@ fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
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…
Reference in New Issue
Block a user