From 8a2acf66163446ac619894316eec83858f734a9d Mon Sep 17 00:00:00 2001 From: Sam Finch Date: Wed, 18 Oct 2023 15:51:37 +0100 Subject: [PATCH] Expose instruction count --- boa_engine/src/context/mod.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/boa_engine/src/context/mod.rs b/boa_engine/src/context/mod.rs index 721527e4369..2a8a3df9c79 100644 --- a/boa_engine/src/context/mod.rs +++ b/boa_engine/src/context/mod.rs @@ -524,6 +524,12 @@ impl<'host> Context<'host> { Ok(self.enter_realm(old_realm)) } + /// Get the remaining instruction count + #[cfg(freature = "fuzz")] + #[inline] + pub const fn instructions_remaining(&self) -> u64 { + self.instructions_remaining + } /// Get the [`RootShape`]. #[inline] #[must_use]