summaryrefslogtreecommitdiff
path: root/cli/ops/compiler.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-09-26 16:33:25 +0200
committerGitHub <noreply@github.com>2020-09-26 16:33:25 +0200
commitff785bc35aa650152643ffc65a2195e2b27f845b (patch)
tree1a06106a4cb30049e5fb9928c51ab0fea4c21e3b /cli/ops/compiler.rs
parente0d4696a7201301dfa23e108b6e73d016e3f5e63 (diff)
refactor: use JsRuntime to implement TSC (#7691)
This commits removes "CompilerWorker" in favor of using "JsRuntime". "cli/ops/compiler.rs" has been removed in favor of inline registration of ops in "cli/tsc.rs"
Diffstat (limited to 'cli/ops/compiler.rs')
-rw-r--r--cli/ops/compiler.rs32
1 files changed, 0 insertions, 32 deletions
diff --git a/cli/ops/compiler.rs b/cli/ops/compiler.rs
deleted file mode 100644
index faf5fff32..000000000
--- a/cli/ops/compiler.rs
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
-
-use deno_core::serde_json::json;
-use std::sync::Arc;
-use std::sync::Mutex;
-
-pub fn init(
- rt: &mut deno_core::JsRuntime,
- response: Arc<Mutex<Option<String>>>,
-) {
- let custom_assets = std::collections::HashMap::new();
- // TODO(ry) use None.
- // TODO(bartlomieju): is this op even required?
- rt.register_op(
- "op_fetch_asset",
- crate::op_fetch_asset::op_fetch_asset(custom_assets),
- );
-
- super::reg_json_sync(
- rt,
- "op_compiler_respond",
- move |_state, args, _bufs| {
- let mut response_slot = response.lock().unwrap();
- let replaced_value = response_slot.replace(args.to_string());
- assert!(
- replaced_value.is_none(),
- "op_compiler_respond found unexpected existing compiler output",
- );
- Ok(json!({}))
- },
- );
-}