chore(ops): inline FastFunction trait methods (#18226)

This commit is contained in:
Divy Srivastava 2023-03-16 18:50:41 +05:30 committed by GitHub
parent 33b85a2b8e
commit eb3d79ab1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 69 additions and 0 deletions

View file

@ -85,14 +85,17 @@ struct op_void_async_fast {
_phantom: ::std::marker::PhantomData<()>,
}
impl<'scope> deno_core::v8::fast_api::FastFunction for op_void_async_fast {
#[inline(always)]
fn function(&self) -> *const ::std::ffi::c_void {
op_void_async_fast_fn as *const ::std::ffi::c_void
}
#[inline(always)]
fn args(&self) -> &'static [deno_core::v8::fast_api::Type] {
use deno_core::v8::fast_api::Type::*;
use deno_core::v8::fast_api::CType;
&[V8Value, Int32, CallbackOptions]
}
#[inline(always)]
fn return_type(&self) -> deno_core::v8::fast_api::CType {
deno_core::v8::fast_api::CType::Void
}