Make caches optional for EvalContext.

This commit is contained in:
Stephen Chung
2022-04-16 23:32:14 +08:00
parent 855cb76246
commit daf73d5341
10 changed files with 61 additions and 67 deletions

View File

@@ -8,7 +8,7 @@ use crate::ast::{
OpAssignment, ScriptFnDef, Stmt, StmtBlock, StmtBlockContainer, SwitchCases, TryCatchBlock,
};
use crate::engine::{Precedence, KEYWORD_THIS, OP_CONTAINS};
use crate::eval::{Caches, GlobalRuntimeState};
use crate::eval::GlobalRuntimeState;
use crate::func::hashing::get_hasher;
use crate::tokenizer::{
is_keyword_function, is_valid_function_name, is_valid_identifier, Token, TokenStream,
@@ -2686,7 +2686,7 @@ impl Engine {
engine: self,
scope: &mut state.stack,
global: &mut GlobalRuntimeState::new(self),
caches: &mut Caches::new(),
caches: None,
lib: &[],
this_ptr: &mut None,
level,