diff options
Diffstat (limited to 'cli/startup_data.rs')
-rw-r--r-- | cli/startup_data.rs | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/cli/startup_data.rs b/cli/startup_data.rs index 517165d11..86bae2f47 100644 --- a/cli/startup_data.rs +++ b/cli/startup_data.rs @@ -1,7 +1,4 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -#[cfg(feature = "no-snapshot-init")] -use deno_core::Script; - use crate::js::CLI_SNAPSHOT; use crate::js::COMPILER_SNAPSHOT; use deno_core::Snapshot; @@ -10,13 +7,9 @@ use deno_core::StartupData; #[cfg(feature = "no-snapshot-init")] pub fn deno_isolate_init() -> StartupData<'static> { debug!("Deno isolate init without snapshots."); - #[cfg(not(feature = "check-only"))] let source = include_str!(concat!(env!("GN_OUT_DIR"), "/gen/cli/bundle/main.js")); - #[cfg(feature = "check-only")] - let source = ""; - - StartupData::Script(Script { + StartupData::Script(deno_core::Script { filename: "gen/cli/bundle/main.js", source, }) @@ -25,24 +18,16 @@ pub fn deno_isolate_init() -> StartupData<'static> { #[cfg(not(feature = "no-snapshot-init"))] pub fn deno_isolate_init() -> StartupData<'static> { debug!("Deno isolate init with snapshots."); - #[cfg(not(feature = "check-only"))] let data = CLI_SNAPSHOT; - #[cfg(feature = "check-only")] - let data = b""; - StartupData::Snapshot(Snapshot::Static(data)) } #[cfg(feature = "no-snapshot-init")] pub fn compiler_isolate_init() -> StartupData<'static> { debug!("Compiler isolate init without snapshots."); - #[cfg(not(feature = "check-only"))] let source = include_str!(concat!(env!("GN_OUT_DIR"), "/gen/cli/bundle/compiler.js")); - #[cfg(feature = "check-only")] - let source = ""; - - StartupData::Script(Script { + StartupData::Script(deno_core::Script { filename: "gen/cli/bundle/compiler.js", source, }) @@ -51,10 +36,6 @@ pub fn compiler_isolate_init() -> StartupData<'static> { #[cfg(not(feature = "no-snapshot-init"))] pub fn compiler_isolate_init() -> StartupData<'static> { debug!("Deno isolate init with snapshots."); - #[cfg(not(feature = "check-only"))] let data = COMPILER_SNAPSHOT; - #[cfg(feature = "check-only")] - let data = b""; - StartupData::Snapshot(Snapshot::Static(data)) } |