MCPcopy Create free account
hub / github.com/argumentcomputer/ix / tick

Method tick

crates/kernel/src/tc.rs:864–885  ·  view source on GitHub ↗
(&mut self)

Source from the content-addressed store, hash-verified

862 pub fn debug_label_matches_env(&self) -> bool {
863 match crate::env_var("IX_KERNEL_DEBUG_CONST") {
864 Ok(filter) if filter.is_empty() => true,
865 Ok(filter) => {
866 self.debug_label.as_ref().is_some_and(|label| label.contains(&filter))
867 },
868 Err(_) => true,
869 }
870 }
871
872 /// Consume one unit of shared recursive fuel. Returns Err if exhausted.
873 #[inline]
874 pub fn tick(&mut self) -> Result<(), TcError<M>> {
875 if self.rec_fuel == 0 {
876 if crate::env_var("IX_REC_FUEL_DUMP").is_ok()
877 && self.debug_label_matches_env()
878 {
879 log::info!(
880 "[rec fuel] exhausted const={} depth={} def_eq_depth={} infer_only={} native_reduce={} eager_reduce={}",
881 self.debug_label.as_deref().unwrap_or("<unknown>"),
882 self.depth(),
883 self.def_eq_depth,
884 self.infer_only,
885 self.in_native_reduce,
886 self.eager_reduce
887 );
888 self.dump_hot_misses();

Callers 4

is_def_eqMethod · 0.80
tick_consumes_fuelFunction · 0.80
tick_exhaustion_at_zeroFunction · 0.80

Calls 3

env_varFunction · 0.85
dump_hot_missesMethod · 0.80

Tested by 2

tick_consumes_fuelFunction · 0.64
tick_exhaustion_at_zeroFunction · 0.64