Make Engine faster to create.
This commit is contained in:
@@ -2354,7 +2354,6 @@ impl Engine {
|
||||
let op = op_token.to_string();
|
||||
let hash = calc_fn_hash(None, &op, 2);
|
||||
let native_only = !is_valid_function_name(&op);
|
||||
let operator_token = native_only.then(|| op_token.clone());
|
||||
|
||||
let mut args = FnArgsVec::new_const();
|
||||
args.push(root);
|
||||
@@ -2366,7 +2365,7 @@ impl Engine {
|
||||
name: state.get_interned_string(&op),
|
||||
hashes: FnCallHashes::from_native_only(hash),
|
||||
args,
|
||||
op_token: operator_token,
|
||||
op_token: native_only.then(|| op_token.clone()),
|
||||
capture_parent_scope: false,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user