From e5f312a39b9db13985876deafdf60088a31adc7f Mon Sep 17 00:00:00 2001 From: Sam Finch Date: Wed, 18 Oct 2023 15:51:37 +0100 Subject: [PATCH] Expose instruction count --- core/engine/src/context/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/engine/src/context/mod.rs b/core/engine/src/context/mod.rs index dd27ebf8f63..2ebc23bd37b 100644 --- a/core/engine/src/context/mod.rs +++ b/core/engine/src/context/mod.rs @@ -527,6 +527,13 @@ impl Context { Ok(self.enter_realm(old_realm)) } + /// Get the remaining instruction count + #[cfg(feature = "fuzz")] + #[inline] + pub const fn instructions_remaining(&self) -> usize { + self.instructions_remaining + } + /// Get the [`RootShape`]. #[inline] #[must_use]