summaryrefslogtreecommitdiff
path: root/ops/lib.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2022-09-23 09:35:45 +0530
committerGitHub <noreply@github.com>2022-09-23 09:35:45 +0530
commit72af1496d9bc180b49d42976a31b331d0be1b975 (patch)
treee0cc2fba674ccf3a20e662a44263eb61b21b8c17 /ops/lib.rs
parentb5dfcbbcbe6be8ac0a54e14eb8aeb0557b58f55d (diff)
perf: use fast ops for tty (#15976)
Diffstat (limited to 'ops/lib.rs')
-rw-r--r--ops/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/ops/lib.rs b/ops/lib.rs
index c0552fe5c..c6b7816e9 100644
--- a/ops/lib.rs
+++ b/ops/lib.rs
@@ -629,6 +629,10 @@ fn can_be_fast_api(core: &TokenStream2, f: &syn::ItemFn) -> Option<FastApiSyn> {
args.push(arg);
}
None => match is_ref_slice(&ty) {
+ Some(SliceType::U32Mut) => {
+ args.push(quote! { #core::v8::fast_api::Type::TypedArray(#core::v8::fast_api::CType::Uint32) });
+ slices.insert(pos, quote!(u32));
+ }
Some(_) => {
args.push(quote! { #core::v8::fast_api::Type::TypedArray(#core::v8::fast_api::CType::Uint8) });
slices.insert(pos, quote!(u8));