summaryrefslogtreecommitdiff
path: root/runtime/worker_bootstrap.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2023-11-12 20:52:59 -0800
committerGitHub <noreply@github.com>2023-11-13 04:52:59 +0000
commit1ef617e8f3d48098e69e222b6eb6fe981aeca1c3 (patch)
tree8ab4fab5b5b248d51575e874f240c16fba4ae268 /runtime/worker_bootstrap.rs
parent39223f709bcb86069f3aa8eab7a4be80304128e6 (diff)
perf: lazy bootstrap options - first pass (#21164)
Move most runtime options to be lazily loaded. Constant options will be covered in a different PR. Towards https://github.com/denoland/deno/issues/21133
Diffstat (limited to 'runtime/worker_bootstrap.rs')
-rw-r--r--runtime/worker_bootstrap.rs24
1 files changed, 0 insertions, 24 deletions
diff --git a/runtime/worker_bootstrap.rs b/runtime/worker_bootstrap.rs
index 9f2393ba4..3bcf45dd0 100644
--- a/runtime/worker_bootstrap.rs
+++ b/runtime/worker_bootstrap.rs
@@ -107,36 +107,20 @@ impl Default for BootstrapOptions {
/// Keep this in sync with `99_main.js`.
#[derive(Serialize)]
struct BootstrapV8<'a>(
- // args
- &'a Vec<String>,
- // cpu_count
- i32,
- // log_level
- i32,
// runtime_version
&'a str,
- // locale
- &'a str,
// location
Option<&'a str>,
- // no_color
- bool,
- // is_tty
- bool,
// ts_version
&'a str,
// unstable
bool,
// granular unstable flags
&'a [i32],
- // process_id
- i32,
// env!("TARGET")
&'a str,
// v8_version
&'a str,
- // user_agent
- &'a str,
// inspect
bool,
// enable_testing_features
@@ -157,21 +141,13 @@ impl BootstrapOptions {
let ser = deno_core::serde_v8::Serializer::new(&scope);
let bootstrap = BootstrapV8(
- &self.args,
- self.cpu_count as _,
- self.log_level as _,
&self.runtime_version,
- &self.locale,
self.location.as_ref().map(|l| l.as_str()),
- self.no_color,
- self.is_tty,
&self.ts_version,
self.unstable,
self.unstable_features.as_ref(),
- std::process::id() as _,
env!("TARGET"),
deno_core::v8_version(),
- &self.user_agent,
self.inspect,
self.enable_testing_features,
self.has_node_modules_dir,