diff options
Diffstat (limited to 'ops/optimizer_tests/issue16934_fast.out')
-rw-r--r-- | ops/optimizer_tests/issue16934_fast.out | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/ops/optimizer_tests/issue16934_fast.out b/ops/optimizer_tests/issue16934_fast.out index 704329e4a..0cdc3eb25 100644 --- a/ops/optimizer_tests/issue16934_fast.out +++ b/ops/optimizer_tests/issue16934_fast.out @@ -6,17 +6,25 @@ pub struct send_stdin; #[doc(hidden)] impl send_stdin { - pub fn name() -> &'static str { + pub const fn name() -> &'static str { stringify!(send_stdin) } - pub fn v8_fn_ptr<'scope>() -> deno_core::v8::FunctionCallback { - use deno_core::v8::MapFnTo; - Self::v8_func.map_fn_to() + #[allow(clippy::not_unsafe_ptr_arg_deref)] + pub extern "C" fn v8_fn_ptr<'scope>( + info: *const deno_core::v8::FunctionCallbackInfo, + ) { + let info = unsafe { &*info }; + let scope = &mut unsafe { deno_core::v8::CallbackScope::new(info) }; + let args = deno_core::v8::FunctionCallbackArguments::from_function_callback_info( + info, + ); + let rv = deno_core::v8::ReturnValue::from_function_callback_info(info); + Self::v8_func(scope, args, rv); } - pub fn decl<'scope>() -> deno_core::OpDecl { + pub const fn decl<'scope>() -> deno_core::OpDecl { deno_core::OpDecl { name: Self::name(), - v8_fn_ptr: Self::v8_fn_ptr(), + v8_fn_ptr: Self::v8_fn_ptr as _, enabled: true, fast_fn: None, is_async: true, |