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

Function run_checks_on_large_stack

crates/ffi/src/kernel.rs:1005–1058  ·  view source on GitHub ↗
(
  ixon_env: Arc<IxonEnv>,
  lookups: Arc<IxonIngressLookups>,
  names: Vec<Name>,
  expect_pass: Vec<bool>,
  ungrounded: FxHashMap<Name, String>,
  quiet: bool,
  failure_log: Option<Arc<FailureLog

Source from the content-addressed store, hash-verified

1003 let key = (block_key, should_pass);
1004 if let Some(work_idx) = by_block.get(&key).copied() {
1005 work[work_idx].aliases.push(i);
1006 continue;
1007 }
1008 let work_idx = work.len();
1009 by_block.insert(key, work_idx);
1010 }
1011
1012 work.push(CheckWorkItem { primary: i, aliases: vec![i] });
1013 }
1014
1015 work
1016}
1017
1018fn check_schedule_block_addr(
1019 ixon_env: &IxonEnv,
1020 name: &Name,
1021 ungrounded: &FxHashMap<Name, String>,
1022) -> Option<Address> {
1023 if ungrounded.contains_key(name) {
1024 return None;
1025 }
1026 let named = ixon_env.lookup_name(name)?;
1027 if matches!(named.meta().info, ConstantMetaInfo::Muts { .. }) {
1028 return None;
1029 }
1030 let constant = ixon_env.get_const(&named.addr)?;
1031 // Only collapse work by actual serialized kernel blocks. Projection
1032 // constants carry the SCC block address directly; ordinary constants are
1033 // singleton blocks. Do not use declaration-family `all` metadata here: it
1034 // can include names that are not checked by the same kernel block.
1035 match &constant.info {
1036 IxonCI::IPrj(p) => Some(p.block.clone()),
1037 IxonCI::CPrj(p) => Some(p.block.clone()),
1038 IxonCI::RPrj(p) => Some(p.block.clone()),
1039 IxonCI::DPrj(p) => Some(p.block.clone()),
1040 IxonCI::Muts(_) => None,
1041 _ => Some(named.addr),
1042 }
1043}
1044
1045fn run_checks_on_large_stack<M: KernelMode>(
1046 ixon_env: Arc<IxonEnv>,
1047 lookups: Arc<IxonIngressLookups>,
1048 names: Vec<Name>,
1049 expect_pass: Vec<bool>,
1050 ungrounded: FxHashMap<Name, String>,
1051 quiet: bool,
1052 failure_log: Option<Arc<FailureLog>>,
1053) -> Result<Vec<CheckRes>, String>
1054where
1055 M::MField<Vec<Name>>: CheckDupLevelParams,
1056{
1057 if names.is_empty() {
1058 eprintln!("[rs_kernel_check] checking 0 constants...");
1059 return Ok(Vec::new());
1060 }
1061

Callers

nothing calls this directly

Calls 4

build_check_workFunction · 0.85
is_emptyMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected