From cbdf9c50095b86e72a8e0e715a02f6eb327f7c53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Wed, 8 Jan 2020 15:06:04 +0100 Subject: refactor: module loading in EsIsolate (#3615) * refactored RecursiveLoad - it was renamed to RecursiveModuleLoad, it does not take ownership of isolate anymore - a struct implementing Stream that yields SourceCodeInfo * untangled module loading logic between RecursiveLoad and isolate - that logic is encapsulated in EsIsolate and RecursiveModuleLoad, where isolate just consumes modules as they become available - does not require to pass Arc> around anymore * removed EsIsolate.mods_ in favor of Modules and moved them inside EsIsolate * EsIsolate now requires "loader" argument during construction - struct that implements Loader trait * rewrite first methods on isolate as async --- cli/js.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/js.rs') diff --git a/cli/js.rs b/cli/js.rs index 134a57503..09fe3f8fa 100644 --- a/cli/js.rs +++ b/cli/js.rs @@ -28,7 +28,7 @@ pub fn get_asset(name: &str) -> Option<&'static str> { #[test] fn cli_snapshot() { - let mut isolate = deno_core::EsIsolate::new( + let mut isolate = deno_core::Isolate::new( deno_core::StartupData::Snapshot(CLI_SNAPSHOT), false, ); @@ -45,7 +45,7 @@ fn cli_snapshot() { #[test] fn compiler_snapshot() { - let mut isolate = deno_core::EsIsolate::new( + let mut isolate = deno_core::Isolate::new( deno_core::StartupData::Snapshot(COMPILER_SNAPSHOT), false, ); -- cgit v1.2.3