From 5ba29ab074755ac765283027e0c2f16553bdc0bd 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 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/engine/src/context/mod.rs b/core/engine/src/context/mod.rs index dd27ebf8f63..b51fe785023 100644 --- a/core/engine/src/context/mod.rs +++ b/core/engine/src/context/mod.rs @@ -527,6 +527,12 @@ impl Context { Ok(self.enter_realm(old_realm)) } + /// Get the remaining instruction count + #[cfg(feature = "fuzz")] + #[inline] + pub const fn instructions_remaining(&self) -> u64 { + self.instructions_remaining + } /// Get the [`RootShape`]. #[inline] #[must_use]