diff options
Diffstat (limited to 'ops/op2/test_cases/sync/string_owned.out')
-rw-r--r-- | ops/op2/test_cases/sync/string_owned.out | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/ops/op2/test_cases/sync/string_owned.out b/ops/op2/test_cases/sync/string_owned.out new file mode 100644 index 000000000..7418a311c --- /dev/null +++ b/ops/op2/test_cases/sync/string_owned.out @@ -0,0 +1,73 @@ +#[allow(non_camel_case_types)] +struct op_string_owned { + _unconstructable: ::std::marker::PhantomData<()>, +} +impl deno_core::_ops::Op for op_string_owned { + const NAME: &'static str = stringify!(op_string_owned); + const DECL: deno_core::_ops::OpDecl = deno_core::_ops::OpDecl { + name: stringify!(op_string_owned), + v8_fn_ptr: Self::v8_fn_ptr as _, + enabled: true, + fast_fn: Some({ + use deno_core::v8::fast_api::Type; + use deno_core::v8::fast_api::CType; + deno_core::v8::fast_api::FastFunction::new( + &[Type::V8Value, Type::SeqOneByteString], + CType::Uint32, + Self::v8_fn_ptr_fast as *const ::std::ffi::c_void, + ) + }), + is_async: false, + is_unstable: false, + is_v8: false, + arg_count: 1usize as u8, + }; +} +impl op_string_owned { + pub const fn name() -> &'static str { + stringify!(op_string_owned) + } + pub const fn decl() -> deno_core::_ops::OpDecl { + deno_core::_ops::OpDecl { + name: stringify!(op_string_owned), + v8_fn_ptr: Self::v8_fn_ptr as _, + enabled: true, + fast_fn: Some({ + use deno_core::v8::fast_api::Type; + use deno_core::v8::fast_api::CType; + deno_core::v8::fast_api::FastFunction::new( + &[Type::V8Value, Type::SeqOneByteString], + CType::Uint32, + Self::v8_fn_ptr_fast as *const ::std::ffi::c_void, + ) + }), + is_async: false, + is_unstable: false, + is_v8: false, + arg_count: 1usize as u8, + } + } + fn v8_fn_ptr_fast( + _: deno_core::v8::Local<deno_core::v8::Object>, + arg0: *mut deno_core::v8::fast_api::FastApiOneByteString, + ) -> u32 { + let arg0 = deno_core::_ops::to_string_ptr(unsafe { &mut *arg0 }); + let result = Self::call(arg0); + result + } + extern "C" fn v8_fn_ptr(info: *const deno_core::v8::FunctionCallbackInfo) { + let scope = &mut unsafe { deno_core::v8::CallbackScope::new(&*info) }; + let mut rv = deno_core::v8::ReturnValue::from_function_callback_info(unsafe { + &*info + }); + let args = deno_core::v8::FunctionCallbackArguments::from_function_callback_info(unsafe { + &*info + }); + let arg0 = args.get(0usize as i32); + let arg0 = arg0.to_rust_string_lossy(scope); + let result = Self::call(arg0); + rv.set_uint32(result as u32); + } + #[inline(always)] + fn call(s: String) -> u32 {} +} |