Issue #3035: Function instances per representation and crossing unification for mixed classes

Open and answer this issue on GitHub.

async, ready, queued · opened 2026-12-01 · updated 2026-12-01 · 0 comments

Part of #3027. Decided in ADR-threads-v1 D4.

Why: today a function reached by a value that may cross and by one that may not merges both classes to the atomic floor; D4 instantiates it per representation instead.

To build

  1. First verify what the emitter has: where the sharing analysis’s verdict per allocation class reaches the lowered Shared/SharedMut/Locked today (ADR-037 D7, lock.rs Local/Crossing), and whether a mode marker type exists in the lowered Rust. Report it before extending.
  2. A representation parameter on functions reached by both kinds, chosen at each call by the argument’s proven class, instantiated as a generic is.
  3. A container or a dyn holding values of both kinds is one class; one crossing element makes it crossing. One probe per shape (Vec, Map, Option, struct field, dyn trait object).
  4. Public signatures stay at the floor (ADR-037 D8).

Done when: a tests/compiler/tests/ program with one function called with a crossing and a non-crossing Shared shows (via --sharing) two instances, plain and atomic; the mixed-shape probes lower to the crossing representation; written in Nikaia (compiler/*.nika).


Generated by Claude Code

Back to Open Issues