feat: less env clone
This commit is contained in:
@@ -55,8 +55,9 @@ impl<'vm, 'jit: 'vm> Func<'jit, 'vm> {
|
||||
pub fn call(&self, vm: &'vm VM<'jit>, arg: Value<'jit, 'vm>) -> Result<Value<'jit, 'vm>> {
|
||||
use Param::*;
|
||||
|
||||
let env = match self.func.param.clone() {
|
||||
Ident(ident) => self.env.clone().enter_arg(ident, arg),
|
||||
let mut env = self.env.clone();
|
||||
match self.func.param.clone() {
|
||||
Ident(ident) => env.enter_arg(ident, arg),
|
||||
Formals {
|
||||
formals,
|
||||
ellipsis,
|
||||
@@ -86,7 +87,7 @@ impl<'vm, 'jit: 'vm> Func<'jit, 'vm> {
|
||||
if let Some(alias) = alias {
|
||||
new.insert(alias, Value::AttrSet(arg));
|
||||
}
|
||||
self.env.clone().enter_attrs(new.into())
|
||||
env.enter_let(new.into())
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user