summaryrefslogtreecommitdiff
path: root/deno_typescript
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2020-04-23 05:51:07 -0400
committerGitHub <noreply@github.com>2020-04-23 11:51:07 +0200
commitd8711155ca20fb2907beed304557d0815ac56452 (patch)
tree410c23ed6d3e520a6b335b02577ad0b29b707cf4 /deno_typescript
parent10a174834e6e59ea055d6098a07b82a3854a2db9 (diff)
Rename deno_core::Isolate to deno_core::CoreIsolate (#4851)
Diffstat (limited to 'deno_typescript')
-rw-r--r--deno_typescript/lib.rs22
1 files changed, 11 insertions, 11 deletions
diff --git a/deno_typescript/lib.rs b/deno_typescript/lib.rs
index 24ecd6287..d554022d8 100644
--- a/deno_typescript/lib.rs
+++ b/deno_typescript/lib.rs
@@ -8,8 +8,8 @@ extern crate serde_json;
mod ops;
use deno_core::js_check;
pub use deno_core::v8_set_flags;
+use deno_core::CoreIsolate;
use deno_core::ErrBox;
-use deno_core::Isolate;
use deno_core::ModuleSpecifier;
use deno_core::Op;
use deno_core::StartupData;
@@ -49,11 +49,11 @@ pub struct TSState {
fn compiler_op<D>(
ts_state: Arc<Mutex<TSState>>,
dispatcher: D,
-) -> impl Fn(&mut deno_core::Isolate, &[u8], Option<ZeroCopyBuf>) -> Op
+) -> impl Fn(&mut CoreIsolate, &[u8], Option<ZeroCopyBuf>) -> Op
where
D: Fn(&mut TSState, &[u8]) -> Op,
{
- move |_isolate: &mut deno_core::Isolate,
+ move |_isolate: &mut CoreIsolate,
control: &[u8],
zero_copy_buf: Option<ZeroCopyBuf>|
-> Op {
@@ -64,7 +64,7 @@ where
}
pub struct TSIsolate {
- isolate: Box<Isolate>,
+ isolate: Box<CoreIsolate>,
state: Arc<Mutex<TSState>>,
}
@@ -73,7 +73,7 @@ impl TSIsolate {
bundle: bool,
maybe_extern_crate_modules: Option<ExternCrateModules>,
) -> TSIsolate {
- let mut isolate = Isolate::new(StartupData::None, false);
+ let mut isolate = CoreIsolate::new(StartupData::None, false);
js_check(isolate.execute("assets/typescript.js", TYPESCRIPT_CODE));
js_check(isolate.execute("compiler_main.js", COMPILER_CODE));
@@ -196,7 +196,7 @@ fn print_source_code(code: &str) {
/// Create a V8 snapshot.
pub fn mksnapshot_bundle(
- isolate: &mut Isolate,
+ isolate: &mut CoreIsolate,
snapshot_filename: &Path,
bundle_filename: &Path,
main_module_name: &str,
@@ -216,7 +216,7 @@ pub fn mksnapshot_bundle(
/// Create a V8 snapshot. This differs from mksnapshot_bundle in that is also
/// runs typescript.js
pub fn mksnapshot_bundle_ts(
- isolate: &mut Isolate,
+ isolate: &mut CoreIsolate,
snapshot_filename: &Path,
bundle_filename: &Path,
main_module_name: &str,
@@ -231,7 +231,7 @@ pub fn mksnapshot_bundle_ts(
}
fn write_snapshot(
- runtime_isolate: &mut Isolate,
+ runtime_isolate: &mut CoreIsolate,
snapshot_filename: &Path,
) -> Result<(), ErrBox> {
println!("Creating snapshot...");
@@ -326,14 +326,14 @@ pub fn trace_serializer() {
}
/// Warning: Returns a non-JSON op dispatcher. Must be manually attached to
-/// Isolate.
+/// CoreIsolate.
pub fn op_fetch_asset<S: ::std::hash::BuildHasher>(
custom_assets: HashMap<String, PathBuf, S>,
-) -> impl Fn(&mut deno_core::Isolate, &[u8], Option<ZeroCopyBuf>) -> Op {
+) -> impl Fn(&mut CoreIsolate, &[u8], Option<ZeroCopyBuf>) -> Op {
for (_, path) in custom_assets.iter() {
println!("cargo:rerun-if-changed={}", path.display());
}
- move |_isolate: &mut deno_core::Isolate,
+ move |_isolate: &mut CoreIsolate,
control: &[u8],
zero_copy_buf: Option<ZeroCopyBuf>|
-> Op {