summaryrefslogtreecommitdiff
path: root/cli/ops/compiler.rs
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2020-01-22 20:18:01 +0100
committerGitHub <noreply@github.com>2020-01-22 20:18:01 +0100
commitbd9561f4de8f940ce6ed8b5eedfa84161a749c54 (patch)
tree20bc23c294aa3031fe4729dc09e03351ec6097f4 /cli/ops/compiler.rs
parent3c47718959fb38d51e34c64d423151b5326bae3a (diff)
Reland "Create an old program to be used in snapshot." (#3747)
* read CLI assets from disk during snapshotting
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 cb2fb01a0..e515081df 100644
--- a/cli/ops/compiler.rs
+++ b/cli/ops/compiler.rs
@@ -17,10 +17,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))),
- );
}
#[derive(Deserialize)]
@@ -149,21 +145,3 @@ 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)
- }
-}