diff options
author | David Sherret <dsherret@users.noreply.github.com> | 2024-10-24 15:48:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-24 19:48:48 +0000 |
commit | eedf243b5ea98d22649bb0445444719a2fc12c59 (patch) | |
tree | 8f31d76e6223c195afb848f42d1ec7b9115bc7e1 /cli/standalone/file_system.rs | |
parent | ea641897c92e3975dd102b31c1419720df358d12 (diff) |
perf(compile): pass module source data from binary directly to v8 (#26494)
This changes denort to pass a static reference of the moude source bytes found in the binary to v8 instead of copying it.
Diffstat (limited to 'cli/standalone/file_system.rs')
-rw-r--r-- | cli/standalone/file_system.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cli/standalone/file_system.rs b/cli/standalone/file_system.rs index 314444630..712c6ee91 100644 --- a/cli/standalone/file_system.rs +++ b/cli/standalone/file_system.rs @@ -22,8 +22,8 @@ use super::virtual_fs::FileBackedVfs; pub struct DenoCompileFileSystem(Arc<FileBackedVfs>); impl DenoCompileFileSystem { - pub fn new(vfs: FileBackedVfs) -> Self { - Self(Arc::new(vfs)) + pub fn new(vfs: Arc<FileBackedVfs>) -> Self { + Self(vfs) } fn error_if_in_vfs(&self, path: &Path) -> FsResult<()> { |