feat(core): codegen ops (#13861)

Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
This commit is contained in:
Divy Srivastava 2022-03-14 23:14:15 +05:30 committed by GitHub
parent 4e3ed37037
commit b4e42953e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
78 changed files with 1754 additions and 1664 deletions

View file

@ -1,6 +1,7 @@
// Copyright 2018-2022 the Deno authors. All rights reserved. MIT license.
use deno_core::error::AnyError;
use deno_core::op;
use deno_core::OpState;
use deno_core::Resource;
use deno_core::ResourceId;
@ -32,6 +33,7 @@ impl Resource for CompressionResource {
}
}
#[op]
pub fn op_compression_new(
state: &mut OpState,
format: String,
@ -53,6 +55,7 @@ pub fn op_compression_new(
Ok(state.resource_table.add(resource))
}
#[op]
pub fn op_compression_write(
state: &mut OpState,
rid: ResourceId,
@ -86,6 +89,7 @@ pub fn op_compression_write(
Ok(out.into())
}
#[op]
pub fn op_compression_finish(
state: &mut OpState,
rid: ResourceId,