Fix copying on method calls

This commit is contained in:
Andrew Morris
2023-06-22 18:13:01 +10:00
parent 526d465aa4
commit 7c217dd264
2 changed files with 2 additions and 3 deletions

View File

@@ -357,7 +357,7 @@ impl StackFrameTrait for BytecodeStackFrame {
new_frame.write_this(
const_call,
match &obj {
ThisArg::Register(reg_i) => self.registers[reg_i.clone()].clone(),
ThisArg::Register(reg_i) => take(&mut self.registers[reg_i.clone()]),
ThisArg::Val(val) => val.clone(),
},
)?;