summaryrefslogtreecommitdiff
path: root/cli
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-09-06 16:50:49 +0200
committerGitHub <noreply@github.com>2020-09-06 16:50:49 +0200
commit803bdd37c759ee859d89e7e957d2764d0db72af4 (patch)
tree0c055191e134803b893af818f97f8b38eba8142f /cli
parentc821e8f2f1fb8ad5e9eb00854277cafc8c80b2f5 (diff)
refactor(core): merge CoreIsolate and EsIsolate (#7370)
Diffstat (limited to 'cli')
-rw-r--r--cli/global_state.rs4
-rw-r--r--cli/main.rs4
-rw-r--r--cli/worker.rs6
3 files changed, 7 insertions, 7 deletions
diff --git a/cli/global_state.rs b/cli/global_state.rs
index cb265d9e5..79618b741 100644
--- a/cli/global_state.rs
+++ b/cli/global_state.rs
@@ -96,7 +96,7 @@ impl GlobalState {
}
/// This function is called when new module load is
- /// initialized by the EsIsolate. Its resposibility is to collect
+ /// initialized by the CoreIsolate. Its resposibility is to collect
/// all dependencies and if it is required then also perform TS typecheck
/// and traspilation.
pub async fn prepare_module_load(
@@ -180,7 +180,7 @@ impl GlobalState {
}
// TODO(bartlomieju): this method doesn't need to be async anymore
- /// This method is used after `prepare_module_load` finishes and EsIsolate
+ /// This method is used after `prepare_module_load` finishes and CoreIsolate
/// starts loading source and executing source code. This method shouldn't
/// perform any IO (besides $DENO_DIR) and only operate on sources collected
/// during `prepare_module_load`.
diff --git a/cli/main.rs b/cli/main.rs
index 49efbfed5..2e2dc71a2 100644
--- a/cli/main.rs
+++ b/cli/main.rs
@@ -79,9 +79,9 @@ use crate::permissions::Permissions;
use crate::tsc::TargetLib;
use crate::worker::MainWorker;
use deno_core::v8_set_flags;
+use deno_core::CoreIsolate;
use deno_core::Deps;
use deno_core::ErrBox;
-use deno_core::EsIsolate;
use deno_core::ModuleSpecifier;
use deno_doc as doc;
use deno_doc::parser::DocFileLoader;
@@ -217,7 +217,7 @@ async fn print_file_info(
{
output.map = source_map.filename.to_str().map(|s| s.to_owned());
}
- let es_state_rc = EsIsolate::state(&worker.isolate);
+ let es_state_rc = CoreIsolate::state(&worker.isolate);
let es_state = es_state_rc.borrow();
if let Some(deps) = es_state.modules.deps(&module_specifier) {
diff --git a/cli/worker.rs b/cli/worker.rs
index 3aaf92f48..ac0ef0d26 100644
--- a/cli/worker.rs
+++ b/cli/worker.rs
@@ -91,7 +91,7 @@ fn create_channels() -> (WorkerChannelsInternal, WorkerHandle) {
/// - `WebWorker`
pub struct Worker {
pub name: String,
- pub isolate: deno_core::EsIsolate,
+ pub isolate: deno_core::CoreIsolate,
pub inspector: Option<Box<DenoInspector>>,
pub state: Rc<State>,
pub waker: AtomicWaker,
@@ -105,7 +105,7 @@ impl Worker {
startup_data: StartupData,
state: &Rc<State>,
) -> Self {
- let mut isolate = deno_core::EsIsolate::new(
+ let mut isolate = deno_core::CoreIsolate::new_with_loader(
state.clone(),
state.clone(),
startup_data,
@@ -235,7 +235,7 @@ impl Future for Worker {
}
impl Deref for Worker {
- type Target = deno_core::EsIsolate;
+ type Target = deno_core::CoreIsolate;
fn deref(&self) -> &Self::Target {
&self.isolate
}