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

Function check_schedule_block_addr

crates/ffi/src/kernel.rs:978–1003  ·  view source on GitHub ↗
(
  ixon_env: &IxonEnv,
  name: &Name,
  ungrounded: &FxHashMap<Name, String>,
)

Source from the content-addressed store, hash-verified

976/// spawning its `.dedicated` workers so they get `KERNEL_CHECK_STACK_SIZE`-
977/// class stacks — deep recursor expansions overflow the default 8 MB
978/// `lthread` stack just like they would the Rust workers' (see above).
979#[unsafe(no_mangle)]
980extern "C" fn rs_lean_set_thread_stack_size(
981 size: usize,
982) -> LeanIOResult<LeanOwned> {
983 unsafe { lean_internal_set_thread_stack_size(size) };
984 LeanIOResult::ok(LeanOwned::box_usize(0))
985}
986
987#[derive(Clone, Debug)]
988struct CheckWorkItem {
989 primary: usize,
990 aliases: Vec<usize>,
991}
992
993fn build_check_work(
994 ixon_env: &IxonEnv,
995 names: &[Name],
996 expect_pass: &[bool],
997 ungrounded: &FxHashMap<Name, String>,
998) -> Vec<CheckWorkItem> {
999 let mut work: Vec<CheckWorkItem> = Vec::with_capacity(names.len());
1000 let mut by_block: FxHashMap<(Address, bool), usize> = FxHashMap::default();
1001
1002 for (i, name) in names.iter().enumerate() {
1003 let should_pass = expect_pass.get(i).copied().unwrap_or(true);
1004 let block_key = check_schedule_block_addr(ixon_env, name, ungrounded);
1005 if let Some(block_key) = block_key {
1006 let key = (block_key, should_pass);

Callers 1

build_check_workFunction · 0.85

Calls 4

lookup_nameMethod · 0.80
contains_keyMethod · 0.45
get_constMethod · 0.45
cloneMethod · 0.45

Tested by

no test coverage detected