pub enum StatementKind {
Assign(Place, Rvalue),
Drop(Place),
TaskBoundary(Vec<Operand>, TaskBoundaryKind),
ClosureCapture {
closure_slot: SlotId,
operands: Vec<Operand>,
function_id: Option<u16>,
},
ArrayStore {
container_slot: SlotId,
operands: Vec<Operand>,
},
ObjectStore {
container_slot: SlotId,
operands: Vec<Operand>,
field_names: Vec<String>,
schema_id: Option<u32>,
},
EnumStore {
container_slot: SlotId,
operands: Vec<Operand>,
variant_name: Option<String>,
},
Nop,
}Variants§
Assign(Place, Rvalue)
Assign a value to a place: place = rvalue
Drop(Place)
Drop a place (scope exit, explicit drop). Generates invalidation facts for any loans on this place.
TaskBoundary(Vec<Operand>, TaskBoundaryKind)
Cross a task boundary (spawn/join branch capture). Operands are the values flowing into the spawned task. The kind distinguishes detached vs structured tasks.
ClosureCapture
Capture values into a closure environment.
Operands are the outer values flowing into the closure.
function_id is patched after bytecode compilation resolves the closure’s index.
ArrayStore
Store values into an array literal. Operands are the array elements being stored.
ObjectStore
Store values into an object or struct literal.
Operands are the fields/spreads being stored.
field_names carries the string key for each operand (from the AST).
When present, JIT codegen can construct a proper object with named fields.
schema_id carries the user-declared (or anonymous-inline) schema id
from the bytecode-side OpCode::NewTypedObject operand
(Operand::TypedObjectAlloc { schema_id, field_count }). MIR lowering
emits None; the bytecode compiler back-patches the resolved
SchemaId via crate::compiler::mir_schema_threading:: back_patch_schema_ids (Phase 3 cluster-0 Round 16 W17-narrow-
follow-up-A, ADR-006 §2.7.5 stamp-at-compile-time). The JIT MIR
consumer at crates/shape-jit/src/mir_compiler/statements.rs:: StatementKind::ObjectStore uses this id directly for
typed_object_alloc, preserving the user-declared schema identity
(e.g. X schema = 53 in Smoke 3) instead of the prior
register_predeclared_any_schema __predecl_*-named id (54).
None when the back-patch could not resolve the schema (the
downstream JIT consumer surfaces-and-stops per §2.7.5 — no
register_predeclared_any_schema fallback, no Bool-default).
Fields
EnumStore
Store values into an enum payload. Operands are the tuple/struct payload values being stored.
variant_name carries the constructor name (Ok / Err / Some /
user-defined variant) — known at MIR-lowering time and threaded
through so the JIT EnumStore consumer can dispatch to the right
typed-Arc producer (jit_v2_make_result_ok / _err /
jit_v2_make_option_some). None is permitted for paths that
haven’t been migrated to thread the variant; downstream JIT
consumers surface-and-stop on None for non-empty payloads per
ADR-006 §2.7.5 / §2.7.7 #9 (no Bool-default fallback).
Nop
No-op (placeholder, padding).
Trait Implementations§
Source§impl Clone for StatementKind
impl Clone for StatementKind
Source§impl Debug for StatementKind
impl Debug for StatementKind
Source§impl PartialEq for StatementKind
impl PartialEq for StatementKind
impl StructuralPartialEq for StatementKind
Auto Trait Implementations§
impl Freeze for StatementKind
impl RefUnwindSafe for StatementKind
impl Send for StatementKind
impl Sync for StatementKind
impl Unpin for StatementKind
impl UnsafeUnpin for StatementKind
impl UnwindSafe for StatementKind
Blanket Implementations§
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more