From b0084ddeb4e368cf51f923d62bf2937db06722fd 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 c27418c4cf4..a3d96233b82 100644 --- a/boa_engine/src/context/mod.rs +++ b/boa_engine/src/context/mod.rs @@ -535,6 +535,12 @@ impl Context { 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]