diff options
author | Kitson Kelly <me@kitsonkelly.com> | 2020-01-12 22:20:33 +1100 |
---|---|---|
committer | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2020-01-12 12:20:33 +0100 |
commit | 737ab94ea1bdf65eeef323ea37e84bcf430fb92c (patch) | |
tree | b6a239195a960557a5d32f1762886f77a71a9104 /cli/ops | |
parent | 8fac8ab130b3cb8a93d7e0e37fa1ea6ea4cc2e4a (diff) |
Create an old program to be used in snapshot. (#3644)
Diffstat (limited to 'cli/ops')
-rw-r--r-- | cli/ops/compiler.rs | 22 |
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 { |