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

Method push_local

crates/kernel/src/tc.rs:448–457  ·  view source on GitHub ↗

Push a local variable type (lambda/forall binding, no let-value).

(&mut self, ty: KExpr<M>)

Source from the content-addressed store, hash-verified

446
447 /// Push a local variable type (lambda/forall binding, no let-value).
448 /// The type is interned first: ctx suffix hashing keys on uids, so a
449 /// canonical frame is what lets equal suffixes share cache entries.
450 pub fn push_local(&mut self, ty: KExpr<M>) {
451 let ty = self.env.intern.intern_expr(ty);
452 let mut h = blake3::Hasher::new();
453 h.update(b"ctx.local");
454 h.update(&ty.addr().to_le_bytes());
455 h.update(self.ctx_id.as_bytes());
456 self.ctx_id_stack.push(self.ctx_id);
457 self.ctx_id = h.finalize();
458 self.ctx.push(ty);
459 self.let_vals.push(None);
460 }

Calls 4

as_bytesMethod · 0.80
pushMethod · 0.80
finalizeMethod · 0.80
addrMethod · 0.45