diff --git a/cli/cache/code_cache.rs b/cli/cache/code_cache.rs index d9e951af6e..abcd0d46ac 100644 --- a/cli/cache/code_cache.rs +++ b/cli/cache/code_cache.rs @@ -80,10 +80,6 @@ impl CodeCache { data, )); } - - pub fn remove_code_cache(&self, specifier: &str) { - Self::ensure_ok(self.inner.remove_code_cache(specifier)) - } } impl code_cache::CodeCache for CodeCache { @@ -162,15 +158,6 @@ impl CodeCacheInner { self.conn.execute(sql, params)?; Ok(()) } - - pub fn remove_code_cache(&self, specifier: &str) -> Result<(), AnyError> { - let sql = " - DELETE FROM codecache - WHERE specifier=$1;"; - let params = params![specifier]; - self.conn.execute(sql, params)?; - Ok(()) - } } fn serialize_code_cache_type( diff --git a/cli/module_loader.rs b/cli/module_loader.rs index 186eb02101..a35e60090c 100644 --- a/cli/module_loader.rs +++ b/cli/module_loader.rs @@ -2,7 +2,6 @@ use std::borrow::Cow; use std::cell::RefCell; -use std::collections::HashSet; use std::path::PathBuf; use std::pin::Pin; use std::rc::Rc; @@ -44,7 +43,6 @@ use deno_core::error::generic_error; use deno_core::error::AnyError; use deno_core::futures::future::FutureExt; use deno_core::futures::Future; -use deno_core::parking_lot::Mutex; use deno_core::resolve_url; use deno_core::ModuleCodeString; use deno_core::ModuleLoader; @@ -244,7 +242,6 @@ impl CliModuleLoaderFactory { emitter: self.shared.emitter.clone(), parsed_source_cache: self.shared.parsed_source_cache.clone(), shared: self.shared.clone(), - prevent_v8_code_cache: Default::default(), }))); ModuleLoaderAndSourceMapGetter { module_loader: loader, @@ -296,10 +293,6 @@ struct CliModuleLoaderInner { emitter: Arc, parsed_source_cache: Arc, graph_container: TGraphContainer, - // NOTE(bartlomieju): this is temporary, for deprecated import assertions. - // Should be removed in Deno 2. - // Modules stored here should not be V8 code-cached. - prevent_v8_code_cache: Arc>>, } impl @@ -785,14 +778,6 @@ impl ModuleLoader code_cache: &[u8], ) -> Pin>> { if let Some(cache) = self.0.shared.code_cache.as_ref() { - if self - .0 - .prevent_v8_code_cache - .lock() - .contains(specifier.as_str()) - { - return std::future::ready(()).boxed_local(); - } // This log line is also used by tests. log::debug!( "Updating V8 code cache for ES module: {specifier}, [{source_hash:?}]" @@ -807,19 +792,6 @@ impl ModuleLoader std::future::ready(()).boxed_local() } - fn purge_and_prevent_code_cache(&self, specifier: &str) { - if let Some(cache) = self.0.shared.code_cache.as_ref() { - // This log line is also used by tests. - log::debug!("Remove V8 code cache for ES module: {specifier}"); - cache.remove_code_cache(specifier); - self - .0 - .prevent_v8_code_cache - .lock() - .insert(specifier.to_string()); - } - } - fn get_source_map(&self, file_name: &str) -> Option> { let specifier = resolve_url(file_name).ok()?; match specifier.scheme() {