summaryrefslogtreecommitdiff
path: root/cli/ops/compiler.rs
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2020-01-12 22:20:33 +1100
committerBartek IwaƄczuk <biwanczuk@gmail.com>2020-01-12 12:20:33 +0100
commit737ab94ea1bdf65eeef323ea37e84bcf430fb92c (patch)
treeb6a239195a960557a5d32f1762886f77a71a9104 /cli/ops/compiler.rs
parent8fac8ab130b3cb8a93d7e0e37fa1ea6ea4cc2e4a (diff)
Create an old program to be used in snapshot. (#3644)
Diffstat (limited to 'cli/ops/compiler.rs')
-rw-r--r--cli/ops/compiler.rs22
1 files changed, 0 insertions, 22 deletions
diff --git a/cli/ops/compiler.rs b/cli/ops/compiler.rs
index 114a4e1f0..5d6875fb0 100644
--- a/cli/ops/compiler.rs
+++ b/cli/ops/compiler.rs
@@ -20,10 +20,6 @@ pub fn init(i: &mut Isolate, s: &ThreadSafeState) {
"fetch_source_files",
s.core_op(json_op(s.stateful_op(op_fetch_source_files))),
);
- i.register_op(
- "fetch_asset",
- s.core_op(json_op(s.stateful_op(op_fetch_asset))),
- );
i.register_op("compile", s.core_op(json_op(s.stateful_op(op_compile))));
i.register_op("transpile", s.core_op(json_op(s.stateful_op(op_transpile))));
}
@@ -155,24 +151,6 @@ fn op_fetch_source_files(
Ok(JsonOp::Async(future))
}
-#[derive(Deserialize)]
-struct FetchAssetArgs {
- name: String,
-}
-
-fn op_fetch_asset(
- _state: &ThreadSafeState,
- args: Value,
- _zero_copy: Option<PinnedBuf>,
-) -> Result<JsonOp, ErrBox> {
- let args: FetchAssetArgs = serde_json::from_value(args)?;
- if let Some(source_code) = crate::js::get_asset(&args.name) {
- Ok(JsonOp::Sync(json!(source_code)))
- } else {
- panic!("op_fetch_asset bad asset {}", args.name)
- }
-}
-
#[derive(Deserialize, Debug)]
#[serde(rename_all = "camelCase")]
struct CompileArgs {