pub struct Program {
pub ops: Arc<[Opcode]>,
pub source: Arc<str>,
pub id: u64,
pub is_structural: bool,
pub ics: Arc<[AtomicU64]>,
}Expand description
A compiled, immutable v2 program. Cheap to clone (Arc internals).
Fields§
§ops: Arc<[Opcode]>§source: Arc<str>§id: u64§is_structural: boolTrue when the program contains only structural navigation opcodes (eligible for resolution caching).
ics: Arc<[AtomicU64]>Inline caches — one AtomicU64 slot per opcode. Populated by
Opcode::GetField / Opcode::OptField / Opcode::FieldChain.
Encoding: stored_slot = slot_idx + 1 (0 reserved for “unset”).
No Arc-ptr gating — the hit path is get_index(slot) + byte-eq
key verify. That lets a single slot survive across different
Arc<IndexMap> instances of the same shape, which is the common
case for repeated queries over distinct docs and for shape-uniform
array iteration reaching the opcode inside a sub-program.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Program
impl RefUnwindSafe for Program
impl Send for Program
impl Sync for Program
impl Unpin for Program
impl UnsafeUnpin for Program
impl UnwindSafe for Program
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more