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

Function ingress_recursor

crates/kernel/src/ingress.rs:1501–1626  ·  view source on GitHub ↗
(
  rec: &ixon::constant::Recursor,
  self_id: KId<M>,
  meta: &ConstantMeta,
  ixon_env: &IxonEnv,
  names: &FxHashMap<Address, Name>,
  name_to_addr: &FxHashMap<Name, Address>,
  sharing: &[Arc<Ixon

Source from the content-addressed store, hash-verified

1499 stats,
1500 ));
1501 if let Some(t0) = cont_t0 {
1502 stats.continuation_arms_ns += elapsed_ns(t0);
1503 }
1504 },
1505 ExprFrame::BinderPush { name } => {
1506 let cont_t0 = if stats.enabled { Some(Instant::now()) } else { None };
1507 binder_names.push(name);
1508 if let Some(t0) = cont_t0 {
1509 stats.continuation_arms_ns += elapsed_ns(t0);
1510 }
1511 },
1512 ExprFrame::BinderPop => {
1513 let cont_t0 = if stats.enabled { Some(Instant::now()) } else { None };
1514 binder_names.pop();
1515 if let Some(t0) = cont_t0 {
1516 stats.continuation_arms_ns += elapsed_ns(t0);
1517 }
1518 },
1519 ExprFrame::PrjDone { type_id, field_idx, mdata } => {
1520 let cont_t0 = if stats.enabled { Some(Instant::now()) } else { None };
1521 let s = values.pop().unwrap();
1522 let key =
1523 super::env::ExprKey::Prj(type_id.addr.clone(), field_idx, *s.addr());
1524 values.push(timed_intern_or_build(
1525 intern,
1526 &key,
1527 || KExpr::prj_mdata(type_id, field_idx, s, mdata),
1528 stats,
1529 ));
1530 if let Some(t0) = cont_t0 {
1531 stats.continuation_arms_ns += elapsed_ns(t0);
1532 }
1533 },
1534 ExprFrame::Cache { key } => {
1535 let cont_t0 = if stats.enabled { Some(Instant::now()) } else { None };
1536 let result = values.last().unwrap().clone();
1537 let ins_t0 = if stats.enabled { Some(Instant::now()) } else { None };
1538 cache.insert(key, result);
1539 if let Some(t0) = ins_t0 {
1540 stats.expr_cache_insert_ns += elapsed_ns(t0);
1541 stats.expr_cache_inserts += 1;
1542 stats.expr_cache_peak = stats.expr_cache_peak.max(cache.len() as u64);
1543 }
1544 if let Some(t0) = cont_t0 {
1545 stats.continuation_arms_ns += elapsed_ns(t0);
1546 }
1547 },
1548 }
1549 }
1550
1551 values.pop().ok_or_else(|| "ingress_expr: empty value stack".to_string())
1552}
1553
1554// ============================================================================
1555// Constant ingress
1556// ============================================================================
1557
1558#[allow(clippy::too_many_arguments)]

Callers 2

ingress_standaloneFunction · 0.85
ingress_muts_blockFunction · 0.85

Calls 8

resolve_level_paramsFunction · 0.85
build_mut_ctxFunction · 0.85
ingress_exprFunction · 0.85
resolve_nameFunction · 0.85
resolve_allFunction · 0.85
cloneMethod · 0.45
iterMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected