Repository: denoland/deno_core
Pull request #668 (2024-03-21 17:33:01)

feat(op2): Allow attaching static metadata to ops in #[op2]
Currently, only `sanitizer_details` and `sanitizer_fix` (to replace [this map](https://github.com/denoland/deno/blob/2ce645137a6539411dad8d9fe359bc651b215ba5/cli/tools/test/fmt.rs#L293-L294)), but adding more metadata fields shouldn't require any updates to the macro code.

Now you can write

```rust
#[op2(async)]
#[serde]
#[meta(
  sanitizer_details = "receive a message from a BroadcastChannel",
  sanitizer_fix = "closing the BroadcastChannel"
)]
pub async fn op_broadcast_recv(..) {
 ..
}
```

This expands to setting values in the `OpMetadata` struct, which is attached to `OpDecl` and publically accessible via the `metadata` method on `OpCtx`

Closes https://github.com/denoland/deno_core/issues/467

codecov-commenter: ## [Codecov](https://app.codecov.io/gh/denoland/deno_core/pull/668?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) Report
Attention: Patch coverage is `80.32787%` with `12 lines` in your changes are missing coverage. Please review.
> Project coverage is 80.95%. Comparing base [(`e381df2`)](https://app.codecov.io/gh/denoland/deno_core/commit/e381df2dfcaf955d5747c0499c5ddb6974d17977?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) to head [(`4562448`)](https://app.codecov.io/gh/denoland/deno_core/pull/668?dropdown=coverage&src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland).
> Report is 1 commits behind head on main.

| [Files](https://app.codecov.io/gh/denoland/deno_core/pull/668?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) | Patch % | Lines |
|---|---|---|
| [core/ops.rs](https://app.codecov.io/gh/denoland/deno_core/pull/668?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland#diff-Y29yZS9vcHMucnM=) | 0.00% | [10 Missing :warning: ](https://app.codecov.io/gh/denoland/deno_core/pull/668?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) |
| [core/extensions.rs](https://app.codecov.io/gh/denoland/deno_core/pull/668?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland#diff-Y29yZS9leHRlbnNpb25zLnJz) | 0.00% | [2 Missing :warning: ](https://app.codecov.io/gh/denoland/deno_core/pull/668?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland) |

<details><summary>Additional details and impacted files</summary>


```diff
@@            Coverage Diff             @@
##             main     #668      +/-   ##
==========================================
+ Coverage   80.94%   80.95%   +0.01%     
==========================================
  Files          97       97              
  Lines       24320    24410      +90     
==========================================
+ Hits        19685    19762      +77     
- Misses       4635     4648      +13     
```



</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/denoland/deno_core/pull/668?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=denoland).


Patch:
diff --git a/core/extensions.rs b/core/extensions.rs
index b5d618d..390d756 100644
--- a/core/extensions.rs
+++ b/core/extensions.rs
@@ -1,6 +1,7 @@
 // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
 use crate::modules::IntoModuleCodeString;
 use crate::modules::ModuleCodeString;
+use crate::ops::OpMetadata;
 use crate::runtime::bindings;
 use crate::FastStaticString;
 use crate::OpState;
@@ -182,6 +183,8 @@ pub struct OpDecl {
   pub(crate) fast_fn: Option<FastFunction>,
   /// The fast dispatch call with metrics enabled. If metrics are enabled, the `v8::Function`'s fastcall is created with this callback.
   pub(crate) fast_fn_with_metrics: Option<FastFunction>,
+  /// Any metadata associated with this op.
+  pub metadata: OpMetadata,
 }
 
 impl OpDecl {
@@ -197,6 +200,7 @@ impl OpDecl {
     slow_fn_with_metrics: OpFnRef,
     fast_fn: Option<FastFunction>,
     fast_fn_with_metrics: Option<FastFunction>,
+    metadata: OpMetadata,
   ) -> Self {
     #[allow(deprecated)]
     Self {
@@ -209,6 +213,7 @@ impl OpDecl {
       slow_fn_with_metrics,
       fast_fn,
       fast_fn_with_metrics,
+      metadata,
     }
   }
 
diff --git a/core/lib.rs b/core/lib.rs
index 26260bb..20001d6 100644
--- a/core/lib.rs
+++ b/core/lib.rs
@@ -118,6 +118,7 @@ pub use crate::modules::StaticModuleLoader;
 pub use crate::modules::ValidateImportAttributesCb;
 pub use crate::normalize_path::normalize_path;
 pub use crate::ops::OpId;
+pub use crate::ops::OpMetadata;
 pub use crate::ops::OpState;
 pub use crate::ops::PromiseId;
 pub use crate::ops_builtin::op_close;
diff --git a/core/ops.rs b/core/ops.rs
index 130c04e..f3eaeb1 100644
--- a/core/ops.rs
+++ b/core/ops.rs
@@ -55,6 +55,23 @@ pub fn reentrancy_check(decl: &'static OpDecl) -> Option<ReentrancyGuard> {
   Some(ReentrancyGuard {})
 }
 
+#[derive(Clone, Copy)]
+pub struct OpMetadata {
+  /// A description of the op for use in sanitizer output.
+  pub sanitizer_details: Option<&'static str>,
+  /// The fix for the issue described in `sanitizer_details`.
+  pub sanitizer_fix: Option<&'static str>,
+}
+
+impl OpMetadata {
+  pub const fn default() -> Self {
+    Self {
+      sanitizer_details: None,
+      sanitizer_fix: None,
+    }
+  }
+}
+
 /// Per-op context.
 ///
 // Note: We don't worry too much about the size of this struct because it's allocated once per realm, and is
@@ -230,6 +247,10 @@ impl OpCtx {
   pub(crate) fn runtime_state(&self) -> &JsRuntimeState {
     &self.runtime_state
   }
+
+  pub fn metadata(&self) -> OpMetadata {
+    self.decl.metadata
+  }
 }
 
 /// Maintains the resources and ops inside a JS runtime.
diff --git a/ops/op2/mod.rs b/ops/op2/mod.rs
index d51ad8f..c845f3d 100644
--- a/ops/op2/mod.rs
+++ b/ops/op2/mod.rs
@@ -240,6 +240,9 @@ fn generate_op2(
     .map(|p| parse_str::<Type>(p).expect("Failed to reparse type bounds"))
     .collect::<Vec<_>>();
 
+  let meta_key = signature.metadata.keys().collect::<Vec<_>>();
+  let meta_value = signature.metadata.values().collect::<Vec<_>>();
+
   Ok(quote! {
     #[allow(non_camel_case_types)]
     #(#attrs)*
@@ -259,6 +262,10 @@ fn generate_op2(
         /*slow_fn_metrics*/ Self::#slow_function_metrics as _,
         /*fast_fn*/ #fast_definition,
         /*fast_fn_metrics*/ #fast_definition_metrics,
+        /*metadata*/ ::deno_core::OpMetadata {
+          #(#meta_key: Some(#meta_value),)*
+          ..::deno_core::OpMetadata::default()
+        },
       );
     }
 
diff --git a/ops/op2/signature.rs b/ops/op2/signature.rs
index 08c7bfa..e22147c 100644
--- a/ops/op2/signature.rs
+++ b/ops/op2/signature.rs
@@ -8,6 +8,8 @@ use quote::quote;
 use quote::ToTokens;
 use quote::TokenStreamExt;
 use std::collections::BTreeMap;
+use syn::parse::Parse;
+use syn::parse::ParseStream;
 
 use strum::IntoEnumIterator;
 use strum::IntoStaticStr;
@@ -698,6 +700,8 @@ pub struct ParsedSignature {
   pub lifetime: Option<String>,
   // Generic bounds: each generic must have one and only simple trait bound
   pub generic_bounds: BTreeMap<String, String>,
+  // Metadata keys and values
+  pub metadata: BTreeMap<Ident, syn::Lit>,
 }
 
 #[derive(Copy, Clone, Debug, Eq, PartialEq)]
@@ -811,6 +815,8 @@ pub enum SignatureError {
   InvalidOpStateCombination,
   #[error("JsRuntimeState may only be used in one parameter")]
   InvalidMultipleJsRuntimeState,
+  #[error("Invalid metadata attribute: {0}")]
+  InvalidMetaAttribute(#[source] syn::Error),
 }
 
 #[derive(Error, Debug)]
@@ -911,6 +917,66 @@ pub(crate) fn stringify_token(tokens: impl ToTokens) -> String {
     .replace(" , ", ", ")
 }
 
+struct MetadataPair {
+  key: Ident,
+  _eq: syn::Token![=],
+  value: syn::Lit,
+}
+
+impl Parse for MetadataPair {
+  fn parse(input: ParseStream) -> syn::Result<Self> {
+    Ok(Self {
+      key: input.parse()?,
+      _eq: input.parse()?,
+      value: input.parse()?,
+    })
+  }
+}
+
+impl Parse for MetadataPairs {
+  fn parse(input: ParseStream) -> syn::Result<Self> {
+    let pairs = input.parse_terminated(MetadataPair::parse, syn::Token![,])?;
+    Ok(Self { pairs })
+  }
+}
+
+struct MetadataPairs {
+  pairs: syn::punctuated::Punctuated<MetadataPair, syn::Token![,]>,
+}
+
+fn parse_metadata_pairs(
+  attr: &Attribute,
+) -> Result<Vec<(Ident, syn::Lit)>, SignatureError> {
+  let syn::Meta::List(meta) = &attr.meta else {
+    return Ok(vec![]);
+  };
+  if !meta.path.is_ident("meta") {
+    return Ok(vec![]);
+  }
+
+  let pairs = meta
+    .parse_args_with(MetadataPairs::parse)
+    .map_err(SignatureError::InvalidMetaAttribute)?;
+  Ok(
+    pairs
+      .pairs
+      .into_iter()
+      .map(|pair| (pair.key, pair.value))
+      .collect(),
+  )
+}
+
+fn parse_metadata(
+  attributes: &[Attribute],
+) -> Result<BTreeMap<Ident, syn::Lit>, SignatureError> {
+  let mut metadata = BTreeMap::new();
+  for attr in attributes {
+    let pairs = parse_metadata_pairs(attr)?;
+    metadata.extend(pairs);
+  }
+  Ok(metadata)
+}
+
 pub fn parse_signature(
   attributes: Vec<Attribute>,
   signature: Signature,
@@ -978,12 +1044,15 @@ pub fn parse_signature(
     return Err(SignatureError::InvalidMultipleJsRuntimeState);
   }
 
+  let metadata = parse_metadata(&attributes)?;
+
   Ok(ParsedSignature {
     args,
     names,
     ret_val,
     lifetime,
     generic_bounds,
+    metadata,
   })
 }
 
@@ -1145,6 +1214,10 @@ fn parse_attributes(
 /// Is this a special attribute that we understand?
 pub fn is_attribute_special(attr: &Attribute) -> bool {
   parse_attribute(attr).unwrap_or_default().is_some()
+    // this is kind of ugly, but #[meta(..)] is the only
+    // attribute that we want to omit from the generated code 
+    // that doesn't have a semantic meaning
+    || attr.path().is_ident("meta")
 }
 
 /// Parses an attribute, returning None if this is an attribute we support but is
@@ -1183,6 +1256,7 @@ fn parse_attribute(
       (#[allow ($_rule:path)]) => None,
       (#[doc = $_attr:literal]) => None,
       (#[cfg $_cfg:tt]) => None,
+      (#[meta ($($_key: ident = $_value: literal),*)]) => None,
     })
   }).map_err(|_| AttributeError::InvalidAttribute(stringify_token(attr)))?;
   Ok(res)


Test patch:
diff --git a/ops/op2/test_cases/async/async_arg_return.out b/ops/op2/test_cases/async/async_arg_return.out
index 433067d..d28f850 100644
--- a/ops/op2/test_cases/async/async_arg_return.out
+++ b/ops/op2/test_cases/async/async_arg_return.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_async {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async {
diff --git a/ops/op2/test_cases/async/async_arg_return_result.out b/ops/op2/test_cases/async/async_arg_return_result.out
index a011c7e..28a509c 100644
--- a/ops/op2/test_cases/async/async_arg_return_result.out
+++ b/ops/op2/test_cases/async/async_arg_return_result.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_async {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async {
diff --git a/ops/op2/test_cases/async/async_deferred.out b/ops/op2/test_cases/async/async_deferred.out
index f69f5df..443cb67 100644
--- a/ops/op2/test_cases/async/async_deferred.out
+++ b/ops/op2/test_cases/async/async_deferred.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_async_deferred {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async_deferred {
diff --git a/ops/op2/test_cases/async/async_jsbuffer.out b/ops/op2/test_cases/async/async_jsbuffer.out
index d793c90..0fd85dc 100644
--- a/ops/op2/test_cases/async/async_jsbuffer.out
+++ b/ops/op2/test_cases/async/async_jsbuffer.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_async_v8_buffer {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async_v8_buffer {
diff --git a/ops/op2/test_cases/async/async_lazy.out b/ops/op2/test_cases/async/async_lazy.out
index af977a0..fb3eafb 100644
--- a/ops/op2/test_cases/async/async_lazy.out
+++ b/ops/op2/test_cases/async/async_lazy.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_async_lazy {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async_lazy {
diff --git a/ops/op2/test_cases/async/async_op_metadata.out b/ops/op2/test_cases/async/async_op_metadata.out
new file mode 100644
index 0000000..c4bd1ca
--- /dev/null
+++ b/ops/op2/test_cases/async/async_op_metadata.out
@@ -0,0 +1,191 @@
+#[allow(non_camel_case_types)]
+struct op_blob_read_part {
+    _unconstructable: ::std::marker::PhantomData<()>,
+}
+impl ::deno_core::_ops::Op for op_blob_read_part {
+    const NAME: &'static str = stringify!(op_blob_read_part);
+    const DECL: ::deno_core::_ops::OpDecl = ::deno_core::_ops::OpDecl::new_internal_op2(
+        ::deno_core::__op_name_fast!(op_blob_read_part),
+        true,
+        false,
+        1usize as u8,
+        Self::v8_fn_ptr as _,
+        Self::v8_fn_ptr_metrics as _,
+        None,
+        None,
+        ::deno_core::OpMetadata {
+            sanitizer_details: Some("read from a Blob or File"),
+            sanitizer_fix: Some("awaiting the result of a Blob or File read"),
+            ..::deno_core::OpMetadata::default()
+        },
+    );
+}
+impl op_blob_read_part {
+    pub const fn name() -> &'static str {
+        stringify!(op_blob_read_part)
+    }
+    #[deprecated(note = "Use the const op::DECL instead")]
+    pub const fn decl() -> deno_core::_ops::OpDecl {
+        <Self as deno_core::_ops::Op>::DECL
+    }
+    #[inline(always)]
+    fn slow_function_impl(info: *const deno_core::v8::FunctionCallbackInfo) -> usize {
+        #[cfg(debug_assertions)]
+        let _reentrancy_check_guard = deno_core::_ops::reentrancy_check(
+            &<Self as deno_core::_ops::Op>::DECL,
+        );
+        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 opctx = unsafe {
+            &*(deno_core::v8::Local::<deno_core::v8::External>::cast(args.data()).value()
+                as *const deno_core::_ops::OpCtx)
+        };
+        let result = { Self::call() };
+        let promise_id = deno_core::_ops::to_i32_option(&args.get(0))
+            .unwrap_or_default();
+        if let Some(result) = deno_core::_ops::map_async_op_infallible(
+            opctx,
+            false,
+            false,
+            promise_id,
+            result,
+            |scope, result| { Ok(deno_core::_ops::RustToV8::to_v8(result, scope)) },
+        ) {
+            deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv);
+            return 0;
+        }
+        return 2;
+    }
+    extern "C" fn v8_fn_ptr(info: *const deno_core::v8::FunctionCallbackInfo) {
+        Self::slow_function_impl(info);
+    }
+    extern "C" fn v8_fn_ptr_metrics(info: *const deno_core::v8::FunctionCallbackInfo) {
+        let args = deno_core::v8::FunctionCallbackArguments::from_function_callback_info(unsafe {
+            &*info
+        });
+        let opctx = unsafe {
+            &*(deno_core::v8::Local::<deno_core::v8::External>::cast(args.data()).value()
+                as *const deno_core::_ops::OpCtx)
+        };
+        deno_core::_ops::dispatch_metrics_async(
+            &opctx,
+            deno_core::_ops::OpMetricsEvent::Dispatched,
+        );
+        let res = Self::slow_function_impl(info);
+        if res == 0 {
+            deno_core::_ops::dispatch_metrics_async(
+                &opctx,
+                deno_core::_ops::OpMetricsEvent::Completed,
+            );
+        } else if res == 1 {
+            deno_core::_ops::dispatch_metrics_async(
+                &opctx,
+                deno_core::_ops::OpMetricsEvent::Error,
+            );
+        }
+    }
+    #[inline(always)]
+    async fn call() {
+        return;
+    }
+}
+
+#[allow(non_camel_case_types)]
+struct op_broadcast_recv {
+    _unconstructable: ::std::marker::PhantomData<()>,
+}
+impl ::deno_core::_ops::Op for op_broadcast_recv {
+    const NAME: &'static str = stringify!(op_broadcast_recv);
+    const DECL: ::deno_core::_ops::OpDecl = ::deno_core::_ops::OpDecl::new_internal_op2(
+        ::deno_core::__op_name_fast!(op_broadcast_recv),
+        true,
+        false,
+        1usize as u8,
+        Self::v8_fn_ptr as _,
+        Self::v8_fn_ptr_metrics as _,
+        None,
+        None,
+        ::deno_core::OpMetadata {
+            sanitizer_details: Some("receive a message from a BroadcastChannel"),
+            sanitizer_fix: Some("closing the BroadcastChannel"),
+            ..::deno_core::OpMetadata::default()
+        },
+    );
+}
+impl op_broadcast_recv {
+    pub const fn name() -> &'static str {
+        stringify!(op_broadcast_recv)
+    }
+    #[deprecated(note = "Use the const op::DECL instead")]
+    pub const fn decl() -> deno_core::_ops::OpDecl {
+        <Self as deno_core::_ops::Op>::DECL
+    }
+    #[inline(always)]
+    fn slow_function_impl(info: *const deno_core::v8::FunctionCallbackInfo) -> usize {
+        #[cfg(debug_assertions)]
+        let _reentrancy_check_guard = deno_core::_ops::reentrancy_check(
+            &<Self as deno_core::_ops::Op>::DECL,
+        );
+        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 opctx = unsafe {
+            &*(deno_core::v8::Local::<deno_core::v8::External>::cast(args.data()).value()
+                as *const deno_core::_ops::OpCtx)
+        };
+        let result = { Self::call() };
+        let promise_id = deno_core::_ops::to_i32_option(&args.get(0))
+            .unwrap_or_default();
+        if let Some(result) = deno_core::_ops::map_async_op_infallible(
+            opctx,
+            false,
+            false,
+            promise_id,
+            result,
+            |scope, result| { Ok(deno_core::_ops::RustToV8::to_v8(result, scope)) },
+        ) {
+            deno_core::_ops::RustToV8RetVal::to_v8_rv(result, &mut rv);
+            return 0;
+        }
+        return 2;
+    }
+    extern "C" fn v8_fn_ptr(info: *const deno_core::v8::FunctionCallbackInfo) {
+        Self::slow_function_impl(info);
+    }
+    extern "C" fn v8_fn_ptr_metrics(info: *const deno_core::v8::FunctionCallbackInfo) {
+        let args = deno_core::v8::FunctionCallbackArguments::from_function_callback_info(unsafe {
+            &*info
+        });
+        let opctx = unsafe {
+            &*(deno_core::v8::Local::<deno_core::v8::External>::cast(args.data()).value()
+                as *const deno_core::_ops::OpCtx)
+        };
+        deno_core::_ops::dispatch_metrics_async(
+            &opctx,
+            deno_core::_ops::OpMetricsEvent::Dispatched,
+        );
+        let res = Self::slow_function_impl(info);
+        if res == 0 {
+            deno_core::_ops::dispatch_metrics_async(
+                &opctx,
+                deno_core::_ops::OpMetricsEvent::Completed,
+            );
+        } else if res == 1 {
+            deno_core::_ops::dispatch_metrics_async(
+                &opctx,
+                deno_core::_ops::OpMetricsEvent::Error,
+            );
+        }
+    }
+    #[inline(always)]
+    async fn call() {
+        return;
+    }
+}
diff --git a/ops/op2/test_cases/async/async_op_metadata.rs b/ops/op2/test_cases/async/async_op_metadata.rs
new file mode 100644
index 0000000..3f41d58
--- /dev/null
+++ b/ops/op2/test_cases/async/async_op_metadata.rs
@@ -0,0 +1,19 @@
+// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+#![deny(warnings)]
+deno_ops_compile_test_runner::prelude!();
+
+#[op2(async)]
+#[meta(sanitizer_details = "read from a Blob or File")]
+#[meta(sanitizer_fix = "awaiting the result of a Blob or File read")]
+async fn op_blob_read_part() {
+  return;
+}
+
+#[op2(async)]
+#[meta(
+  sanitizer_details = "receive a message from a BroadcastChannel",
+  sanitizer_fix = "closing the BroadcastChannel"
+)]
+async fn op_broadcast_recv() {
+  return;
+}
diff --git a/ops/op2/test_cases/async/async_opstate.out b/ops/op2/test_cases/async/async_opstate.out
index c625106..73dd417 100644
--- a/ops/op2/test_cases/async/async_opstate.out
+++ b/ops/op2/test_cases/async/async_opstate.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_async_opstate {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async_opstate {
diff --git a/ops/op2/test_cases/async/async_result.out b/ops/op2/test_cases/async/async_result.out
index 83988b3..547e720 100644
--- a/ops/op2/test_cases/async/async_result.out
+++ b/ops/op2/test_cases/async/async_result.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_async {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async {
diff --git a/ops/op2/test_cases/async/async_result_impl.out b/ops/op2/test_cases/async/async_result_impl.out
index 15a60a9..f1d9b02 100644
--- a/ops/op2/test_cases/async/async_result_impl.out
+++ b/ops/op2/test_cases/async/async_result_impl.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_async_result_impl {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async_result_impl {
diff --git a/ops/op2/test_cases/async/async_result_smi.out b/ops/op2/test_cases/async/async_result_smi.out
index 8dd0c09..7f136f4 100644
--- a/ops/op2/test_cases/async/async_result_smi.out
+++ b/ops/op2/test_cases/async/async_result_smi.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_async {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async {
diff --git a/ops/op2/test_cases/async/async_v8_global.out b/ops/op2/test_cases/async/async_v8_global.out
index f8aa6f1..b66b37d 100644
--- a/ops/op2/test_cases/async/async_v8_global.out
+++ b/ops/op2/test_cases/async/async_v8_global.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_async_v8_global {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async_v8_global {
diff --git a/ops/op2/test_cases/async/async_void.out b/ops/op2/test_cases/async/async_void.out
index 8f4a9ab..6813342 100644
--- a/ops/op2/test_cases/async/async_void.out
+++ b/ops/op2/test_cases/async/async_void.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_async {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_async {
diff --git a/ops/op2/test_cases/sync/add.out b/ops/op2/test_cases/sync/add.out
index c3e6c86..d3fc13e 100644
--- a/ops/op2/test_cases/sync/add.out
+++ b/ops/op2/test_cases/sync/add.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_add {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_add {
diff --git a/ops/op2/test_cases/sync/add_options.out b/ops/op2/test_cases/sync/add_options.out
index ba0beeb..5c79f4d 100644
--- a/ops/op2/test_cases/sync/add_options.out
+++ b/ops/op2/test_cases/sync/add_options.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_test_add_option {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_test_add_option {
diff --git a/ops/op2/test_cases/sync/bigint.out b/ops/op2/test_cases/sync/bigint.out
index a5c7af5..55c2b4f 100644
--- a/ops/op2/test_cases/sync/bigint.out
+++ b/ops/op2/test_cases/sync/bigint.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_bigint {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_bigint {
diff --git a/ops/op2/test_cases/sync/bool.out b/ops/op2/test_cases/sync/bool.out
index 968e810..54e5f32 100644
--- a/ops/op2/test_cases/sync/bool.out
+++ b/ops/op2/test_cases/sync/bool.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_bool {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_bool {
diff --git a/ops/op2/test_cases/sync/bool_result.out b/ops/op2/test_cases/sync/bool_result.out
index 183e667..7c0fcb8 100644
--- a/ops/op2/test_cases/sync/bool_result.out
+++ b/ops/op2/test_cases/sync/bool_result.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_bool {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_bool {
diff --git a/ops/op2/test_cases/sync/buffers.out b/ops/op2/test_cases/sync/buffers.out
index 975f02d..0897479 100644
--- a/ops/op2/test_cases/sync/buffers.out
+++ b/ops/op2/test_cases/sync/buffers.out
@@ -42,6 +42,9 @@ impl ::deno_core::_ops::Op for op_buffers {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_buffers {
@@ -306,6 +309,9 @@ impl ::deno_core::_ops::Op for op_buffers_32 {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_buffers_32 {
@@ -541,6 +547,9 @@ impl ::deno_core::_ops::Op for op_buffers_option {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_buffers_option {
diff --git a/ops/op2/test_cases/sync/buffers_copy.out b/ops/op2/test_cases/sync/buffers_copy.out
index ee72d4a..0682727 100644
--- a/ops/op2/test_cases/sync/buffers_copy.out
+++ b/ops/op2/test_cases/sync/buffers_copy.out
@@ -40,6 +40,9 @@ impl ::deno_core::_ops::Op for op_buffers {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_buffers {
@@ -257,6 +260,9 @@ impl ::deno_core::_ops::Op for op_buffers_32 {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_buffers_32 {
diff --git a/ops/op2/test_cases/sync/buffers_out.out b/ops/op2/test_cases/sync/buffers_out.out
index 8d304f7..52e1ee3 100644
--- a/ops/op2/test_cases/sync/buffers_out.out
+++ b/ops/op2/test_cases/sync/buffers_out.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_buffers {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_buffers {
@@ -121,6 +124,9 @@ impl ::deno_core::_ops::Op for op_buffers_option {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_buffers_option {
@@ -236,6 +242,9 @@ impl ::deno_core::_ops::Op for op_arraybuffers {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_arraybuffers {
diff --git a/ops/op2/test_cases/sync/cfg.out b/ops/op2/test_cases/sync/cfg.out
index a3f23db..1e81466 100644
--- a/ops/op2/test_cases/sync/cfg.out
+++ b/ops/op2/test_cases/sync/cfg.out
@@ -31,6 +31,9 @@ impl ::deno_core::_ops::Op for op_maybe_windows {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_maybe_windows {
@@ -153,6 +156,9 @@ impl ::deno_core::_ops::Op for op_maybe_windows {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_maybe_windows {
diff --git a/ops/op2/test_cases/sync/clippy_allow.out b/ops/op2/test_cases/sync/clippy_allow.out
index 800dc76..e27b849 100644
--- a/ops/op2/test_cases/sync/clippy_allow.out
+++ b/ops/op2/test_cases/sync/clippy_allow.out
@@ -31,6 +31,9 @@ impl ::deno_core::_ops::Op for op_extra_annotation {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_extra_annotation {
@@ -151,6 +154,9 @@ impl ::deno_core::_ops::Op for op_clippy_internal {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_clippy_internal {
diff --git a/ops/op2/test_cases/sync/cppgc_resource.out b/ops/op2/test_cases/sync/cppgc_resource.out
index 26dd02f..e0db584 100644
--- a/ops/op2/test_cases/sync/cppgc_resource.out
+++ b/ops/op2/test_cases/sync/cppgc_resource.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_file {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_file {
diff --git a/ops/op2/test_cases/sync/doc_comment.out b/ops/op2/test_cases/sync/doc_comment.out
index fa69916..7cf0668 100644
--- a/ops/op2/test_cases/sync/doc_comment.out
+++ b/ops/op2/test_cases/sync/doc_comment.out
@@ -30,6 +30,9 @@ impl ::deno_core::_ops::Op for op_has_doc_comment {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_has_doc_comment {
diff --git a/ops/op2/test_cases/sync/fast_alternative.out b/ops/op2/test_cases/sync/fast_alternative.out
index a7df59b..ec880b7 100644
--- a/ops/op2/test_cases/sync/fast_alternative.out
+++ b/ops/op2/test_cases/sync/fast_alternative.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_slow {
         Self::v8_fn_ptr_metrics as _,
         Some({ op_fast::DECL.fast_fn() }),
         Some({ op_fast::DECL.fast_fn_with_metrics() }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_slow {
@@ -134,6 +137,9 @@ impl ::deno_core::_ops::Op for op_fast {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_fast {
@@ -281,6 +287,9 @@ impl<T: Trait> ::deno_core::_ops::Op for op_slow_generic<T> {
         Self::v8_fn_ptr_metrics as _,
         Some({ op_fast_generic::<T>::DECL.fast_fn() }),
         Some({ op_fast_generic::<T>::DECL.fast_fn_with_metrics() }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl<T: Trait> op_slow_generic<T> {
@@ -402,6 +411,9 @@ impl<T: Trait> ::deno_core::_ops::Op for op_fast_generic<T> {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl<T: Trait> op_fast_generic<T> {
diff --git a/ops/op2/test_cases/sync/generics.out b/ops/op2/test_cases/sync/generics.out
index bb11fc3..7f6fb1e 100644
--- a/ops/op2/test_cases/sync/generics.out
+++ b/ops/op2/test_cases/sync/generics.out
@@ -29,6 +29,9 @@ impl<T: Trait> ::deno_core::_ops::Op for op_generics<T> {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl<T: Trait> op_generics<T> {
@@ -147,6 +150,9 @@ impl<T: Trait + 'static> ::deno_core::_ops::Op for op_generics_static<T> {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl<T: Trait + 'static> op_generics_static<T> {
@@ -265,6 +271,9 @@ impl<T: Trait + 'static> ::deno_core::_ops::Op for op_generics_static_where<T> {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl<T: Trait + 'static> op_generics_static_where<T> {
diff --git a/ops/op2/test_cases/sync/nofast.out b/ops/op2/test_cases/sync/nofast.out
index 3b99c08..316672f 100644
--- a/ops/op2/test_cases/sync/nofast.out
+++ b/ops/op2/test_cases/sync/nofast.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_nofast {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_nofast {
diff --git a/ops/op2/test_cases/sync/op_state_attr.out b/ops/op2/test_cases/sync/op_state_attr.out
index 1067d64..65d5bc0 100644
--- a/ops/op2/test_cases/sync/op_state_attr.out
+++ b/ops/op2/test_cases/sync/op_state_attr.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_state_rc {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_state_rc {
diff --git a/ops/op2/test_cases/sync/op_state_rc.out b/ops/op2/test_cases/sync/op_state_rc.out
index f4c8b4a..49c7446 100644
--- a/ops/op2/test_cases/sync/op_state_rc.out
+++ b/ops/op2/test_cases/sync/op_state_rc.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_state_rc {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_state_rc {
diff --git a/ops/op2/test_cases/sync/op_state_ref.out b/ops/op2/test_cases/sync/op_state_ref.out
index f9b1f13..ee507f0 100644
--- a/ops/op2/test_cases/sync/op_state_ref.out
+++ b/ops/op2/test_cases/sync/op_state_ref.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_state_ref {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_state_ref {
@@ -171,6 +174,9 @@ impl ::deno_core::_ops::Op for op_state_mut {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_state_mut {
@@ -297,6 +303,9 @@ impl ::deno_core::_ops::Op for op_state_and_v8 {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_state_and_v8 {
@@ -411,6 +420,9 @@ impl ::deno_core::_ops::Op for op_state_and_v8_local {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_state_and_v8_local {
diff --git a/ops/op2/test_cases/sync/result_external.out b/ops/op2/test_cases/sync/result_external.out
index 7169b60..d20b21f 100644
--- a/ops/op2/test_cases/sync/result_external.out
+++ b/ops/op2/test_cases/sync/result_external.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_external_with_result {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_external_with_result {
diff --git a/ops/op2/test_cases/sync/result_primitive.out b/ops/op2/test_cases/sync/result_primitive.out
index 174b6d2..0b87b2a 100644
--- a/ops/op2/test_cases/sync/result_primitive.out
+++ b/ops/op2/test_cases/sync/result_primitive.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_u32_with_result {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_u32_with_result {
diff --git a/ops/op2/test_cases/sync/result_scope.out b/ops/op2/test_cases/sync/result_scope.out
index 4ff0261..33248c7 100644
--- a/ops/op2/test_cases/sync/result_scope.out
+++ b/ops/op2/test_cases/sync/result_scope.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_void_with_result {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_void_with_result {
diff --git a/ops/op2/test_cases/sync/result_void.out b/ops/op2/test_cases/sync/result_void.out
index 2ccccb0..8a09009 100644
--- a/ops/op2/test_cases/sync/result_void.out
+++ b/ops/op2/test_cases/sync/result_void.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_void_with_result {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_void_with_result {
diff --git a/ops/op2/test_cases/sync/serde_v8.out b/ops/op2/test_cases/sync/serde_v8.out
index 2f935b8..95075c2 100644
--- a/ops/op2/test_cases/sync/serde_v8.out
+++ b/ops/op2/test_cases/sync/serde_v8.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_serde_v8 {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_serde_v8 {
diff --git a/ops/op2/test_cases/sync/smi.out b/ops/op2/test_cases/sync/smi.out
index 2098c75..24f533c 100644
--- a/ops/op2/test_cases/sync/smi.out
+++ b/ops/op2/test_cases/sync/smi.out
@@ -36,6 +36,9 @@ impl ::deno_core::_ops::Op for op_smi_unsigned_return {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_smi_unsigned_return {
@@ -246,6 +249,9 @@ impl ::deno_core::_ops::Op for op_smi_signed_return {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_smi_signed_return {
@@ -433,6 +439,9 @@ impl ::deno_core::_ops::Op for op_smi_option {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_smi_option {
diff --git a/ops/op2/test_cases/sync/string_cow.out b/ops/op2/test_cases/sync/string_cow.out
index 726ca36..cc073ad 100644
--- a/ops/op2/test_cases/sync/string_cow.out
+++ b/ops/op2/test_cases/sync/string_cow.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_string_cow {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_string_cow {
diff --git a/ops/op2/test_cases/sync/string_onebyte.out b/ops/op2/test_cases/sync/string_onebyte.out
index e69ac11..2802be5 100644
--- a/ops/op2/test_cases/sync/string_onebyte.out
+++ b/ops/op2/test_cases/sync/string_onebyte.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_string_onebyte {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_string_onebyte {
diff --git a/ops/op2/test_cases/sync/string_option_return.out b/ops/op2/test_cases/sync/string_option_return.out
index 13fbffa..ad39c53 100644
--- a/ops/op2/test_cases/sync/string_option_return.out
+++ b/ops/op2/test_cases/sync/string_option_return.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_string_return {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_string_return {
diff --git a/ops/op2/test_cases/sync/string_owned.out b/ops/op2/test_cases/sync/string_owned.out
index d24caf0..1810e29 100644
--- a/ops/op2/test_cases/sync/string_owned.out
+++ b/ops/op2/test_cases/sync/string_owned.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_string_owned {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_string_owned {
diff --git a/ops/op2/test_cases/sync/string_ref.out b/ops/op2/test_cases/sync/string_ref.out
index b266b01..fe20275 100644
--- a/ops/op2/test_cases/sync/string_ref.out
+++ b/ops/op2/test_cases/sync/string_ref.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_string_owned {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_string_owned {
diff --git a/ops/op2/test_cases/sync/string_return.out b/ops/op2/test_cases/sync/string_return.out
index 05a5b01..2c7d94a 100644
--- a/ops/op2/test_cases/sync/string_return.out
+++ b/ops/op2/test_cases/sync/string_return.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_string_return {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_string_return {
@@ -98,6 +101,9 @@ impl ::deno_core::_ops::Op for op_string_return_ref {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_string_return_ref {
@@ -183,6 +189,9 @@ impl ::deno_core::_ops::Op for op_string_return_cow {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_string_return_cow {
diff --git a/ops/op2/test_cases/sync/v8_global.out b/ops/op2/test_cases/sync/v8_global.out
index b144046..b50e562 100644
--- a/ops/op2/test_cases/sync/v8_global.out
+++ b/ops/op2/test_cases/sync/v8_global.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_global {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_global {
diff --git a/ops/op2/test_cases/sync/v8_handlescope.out b/ops/op2/test_cases/sync/v8_handlescope.out
index a16f4d9..e65462f 100644
--- a/ops/op2/test_cases/sync/v8_handlescope.out
+++ b/ops/op2/test_cases/sync/v8_handlescope.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_handlescope {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_handlescope {
diff --git a/ops/op2/test_cases/sync/v8_lifetime.out b/ops/op2/test_cases/sync/v8_lifetime.out
index 7a0ab6c..841facf 100644
--- a/ops/op2/test_cases/sync/v8_lifetime.out
+++ b/ops/op2/test_cases/sync/v8_lifetime.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_v8_lifetime {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_v8_lifetime {
diff --git a/ops/op2/test_cases/sync/v8_ref_option.out b/ops/op2/test_cases/sync/v8_ref_option.out
index 0478fff..a5781ae 100644
--- a/ops/op2/test_cases/sync/v8_ref_option.out
+++ b/ops/op2/test_cases/sync/v8_ref_option.out
@@ -29,6 +29,9 @@ impl ::deno_core::_ops::Op for op_v8_lifetime {
                 Self::v8_fn_ptr_fast_metrics as *const ::std::ffi::c_void,
             )
         }),
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_v8_lifetime {
diff --git a/ops/op2/test_cases/sync/v8_string.out b/ops/op2/test_cases/sync/v8_string.out
index 6ebf2f2..121ea74 100644
--- a/ops/op2/test_cases/sync/v8_string.out
+++ b/ops/op2/test_cases/sync/v8_string.out
@@ -13,6 +13,9 @@ impl ::deno_core::_ops::Op for op_v8_string {
         Self::v8_fn_ptr_metrics as _,
         None,
         None,
+        ::deno_core::OpMetadata {
+            ..::deno_core::OpMetadata::default()
+        },
     );
 }
 impl op_v8_string {