mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
feat: port node:zlib to rust (#18291)
This commit is contained in:
parent
9ebce6e725
commit
b2fd0742bd
33 changed files with 897 additions and 7471 deletions
|
@ -329,6 +329,7 @@ pub(crate) fn generate(
|
|||
let fast_fn = q!(
|
||||
Vars { core, pre_transforms, op_name_fast: &fast_fn_ident, op_name: &ident, fast_fn_inputs, generics, call_generics: &caller_generics, where_clause, idents, transforms, output_transforms, output: &output },
|
||||
{
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_name_fast generics (_: core::v8::Local<core::v8::Object>, fast_fn_inputs) -> output where_clause {
|
||||
use core::v8;
|
||||
use core::_ops;
|
||||
|
|
|
@ -253,7 +253,7 @@ fn codegen_v8_async(
|
|||
let rust_i0 = special_args.len();
|
||||
let args_head = special_args.into_iter().collect::<TokenStream2>();
|
||||
|
||||
let (arg_decls, args_tail, _) = codegen_args(core, f, rust_i0, 1, true);
|
||||
let (arg_decls, args_tail, _) = codegen_args(core, f, rust_i0, 1, asyncness);
|
||||
let type_params = exclude_lifetime_params(&f.sig.generics.params);
|
||||
|
||||
let (pre_result, mut result_fut) = match asyncness {
|
||||
|
|
|
@ -101,6 +101,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_void_async_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_void_async_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
__promise_id: i32,
|
||||
|
|
|
@ -111,6 +111,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_async_result_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_async_result_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
__promise_id: i32,
|
||||
|
|
|
@ -70,6 +70,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_fallback_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_fallback_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
fast_api_callback_options: *mut deno_core::v8::fast_api::FastApiCallbackOptions,
|
||||
|
|
|
@ -78,6 +78,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_cow_str_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_cow_str_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
c: *const deno_core::v8::fast_api::FastApiOneByteString,
|
||||
|
|
|
@ -96,6 +96,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_f64_buf_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_f64_buf_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
buffer: *const deno_core::v8::fast_api::FastApiTypedArray<f64>,
|
||||
|
|
|
@ -110,6 +110,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_ffi_ptr_value_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_ffi_ptr_value_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
ptr: *mut ::std::ffi::c_void,
|
||||
|
|
|
@ -78,6 +78,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_set_exit_code_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_set_exit_code_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
code: i32,
|
||||
|
|
|
@ -105,6 +105,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for foo_fast {
|
|||
deno_core::v8::fast_api::CType::Uint32
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn foo_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
a: u32,
|
||||
|
|
|
@ -80,6 +80,7 @@ where
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_foo_fast_fn<'scope, SP>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
fast_api_callback_options: *mut deno_core::v8::fast_api::FastApiCallbackOptions,
|
||||
|
|
|
@ -118,6 +118,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for foo_fast {
|
|||
deno_core::v8::fast_api::CType::Uint32
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn foo_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
a: u32,
|
||||
|
|
|
@ -109,6 +109,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_listen_fast {
|
|||
deno_core::v8::fast_api::CType::Uint32
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_listen_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
fast_api_callback_options: *mut deno_core::v8::fast_api::FastApiCallbackOptions,
|
||||
|
|
|
@ -127,6 +127,7 @@ where
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_now_fast_fn<'scope, TP>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
buf: *const deno_core::v8::fast_api::FastApiTypedArray<u8>,
|
||||
|
|
|
@ -136,6 +136,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_add_4_fast {
|
|||
deno_core::v8::fast_api::CType::Uint32
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_add_4_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
x1: u32,
|
||||
|
|
|
@ -90,6 +90,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_string_length_fast {
|
|||
deno_core::v8::fast_api::CType::Uint32
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_string_length_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
string: *const deno_core::v8::fast_api::FastApiOneByteString,
|
||||
|
|
|
@ -153,6 +153,7 @@ where
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_ffi_ptr_of_fast_fn<'scope, FP>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
buf: *const deno_core::v8::fast_api::FastApiTypedArray<u8>,
|
||||
|
|
|
@ -90,6 +90,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_is_proxy_fast {
|
|||
deno_core::v8::fast_api::CType::Bool
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_is_proxy_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
value: deno_core::v8::Local<v8::Value>,
|
||||
|
|
|
@ -91,6 +91,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_string_length_fast {
|
|||
deno_core::v8::fast_api::CType::Uint32
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_string_length_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
string: *const deno_core::v8::fast_api::FastApiOneByteString,
|
||||
|
|
|
@ -167,6 +167,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_import_spki_x25519_fas
|
|||
deno_core::v8::fast_api::CType::Bool
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_import_spki_x25519_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
key_data: *const deno_core::v8::fast_api::FastApiTypedArray<u8>,
|
||||
|
|
|
@ -90,6 +90,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_unit_result_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_unit_result_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
fast_api_callback_options: *mut deno_core::v8::fast_api::FastApiCallbackOptions,
|
||||
|
|
|
@ -123,6 +123,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_set_nodelay_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_set_nodelay_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
rid: ResourceId,
|
||||
|
|
|
@ -79,6 +79,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_unit_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_unit_fast_fn<'scope>(_: deno_core::v8::Local<deno_core::v8::Object>) -> () {
|
||||
use deno_core::v8;
|
||||
use deno_core::_ops;
|
||||
|
|
|
@ -66,6 +66,7 @@ impl<'scope> deno_core::v8::fast_api::FastFunction for op_wasm_fast {
|
|||
deno_core::v8::fast_api::CType::Void
|
||||
}
|
||||
}
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
fn op_wasm_fast_fn<'scope>(
|
||||
_: deno_core::v8::Local<deno_core::v8::Object>,
|
||||
fast_api_callback_options: *mut deno_core::v8::fast_api::FastApiCallbackOptions,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue