Reduce call to Module::is_empty.

This commit is contained in:
Stephen Chung
2022-11-10 23:57:46 +08:00
parent 013ee223ee
commit fca71b5ed2
8 changed files with 15 additions and 43 deletions

View File

@@ -253,9 +253,7 @@ impl Engine {
let orig_lib_len = global.lib.len();
#[cfg(not(feature = "no_function"))]
if ast.has_functions() {
global.lib.push(ast.functions().clone());
}
global.lib.push(ast.shared_lib().clone());
let mut no_this_ptr = Dynamic::NULL;
let this_ptr = this_ptr.unwrap_or(&mut no_this_ptr);