Optimize functions calling.

This commit is contained in:
Stephen Chung
2022-09-27 23:04:22 +08:00
parent b141e8d0e1
commit fde8483f54
7 changed files with 64 additions and 72 deletions

View File

@@ -561,14 +561,12 @@ impl Engine {
}
#[cfg(not(feature = "no_index"))]
Expr::Index(..) => {
self.eval_dot_index_chain(scope, global, caches, lib, this_ptr, expr, level, None)
}
Expr::Index(..) => self
.eval_dot_index_chain(scope, global, caches, lib, this_ptr, expr, level, &mut None),
#[cfg(not(feature = "no_object"))]
Expr::Dot(..) => {
self.eval_dot_index_chain(scope, global, caches, lib, this_ptr, expr, level, None)
}
Expr::Dot(..) => self
.eval_dot_index_chain(scope, global, caches, lib, this_ptr, expr, level, &mut None),
_ => unreachable!("expression cannot be evaluated: {:?}", expr),
};