1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
#[allow(non_camel_case_types)]
struct op_string_cow {
_unconstructable: ::std::marker::PhantomData<()>,
}
impl deno_core::_ops::Op for op_string_cow {
const NAME: &'static str = stringify!(op_string_cow);
const DECL: deno_core::_ops::OpDecl = deno_core::_ops::OpDecl {
name: stringify!(op_string_cow),
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_cow {
pub const fn name() -> &'static str {
stringify!(op_string_cow)
}
pub const fn decl() -> deno_core::_ops::OpDecl {
deno_core::_ops::OpDecl {
name: stringify!(op_string_cow),
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 mut arg0_temp: [::std::mem::MaybeUninit<u8>; 1024] = [::std::mem::MaybeUninit::uninit(); 1024];
let arg0 = deno_core::_ops::to_str_ptr(unsafe { &mut *arg0 }, &mut arg0_temp);
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 mut arg0_temp: [::std::mem::MaybeUninit<u8>; 1024] = [::std::mem::MaybeUninit::uninit(); 1024];
let arg0 = deno_core::_ops::to_str(scope, &arg0, &mut arg0_temp);
let result = Self::call(arg0);
rv.set_uint32(result as u32);
}
#[inline(always)]
fn call(s: Cow<str>) -> u32 {}
}
|