atomics A.0a: lib + IR ops + recognizer, emit bails (lock commit)
Stream A (atomics) foundation. Net-new atomic load/store codegen path, wired end-to-end except LLVM emission, which deliberately bails loudly so the example locks to a clean diagnostic (A.0b turns it green — cadence: no commit both adds a test and makes it pass). - library/modules/std/atomic.sx: Ordering enum, Atomic($T) transparent wrapper (init/load/store, seq_cst-only for now), atomic_load/atomic_store #builtin intrinsics. Opt-in import, NOT in the universal std facade (Ordering in the prelude grows every program's type table + churns 37 .ir snapshots). - IR: atomic_load/atomic_store ops + AtomicOrdering (all 5) + structs (inst.zig); print arms; comptime_vm arms reuse load/store (single-thread correct); recognizer tryLowerAtomicIntrinsic (const-ordering + scalar-size guards, both loud); emit dispatch -> emitAtomicLoad/Store bail via comptime_failed. - examples/1700-atomics-load-store.sx locked to the bail diagnostic. Full ordering surface (a.load(.acquire)) blocked on comptime-constant ordering propagation (comptime enum value params) — A.0.5, migrated not legacy.
This commit is contained in:
@@ -1836,6 +1836,7 @@ pub const Lowering = struct {
|
||||
pub const hasCastWithRuntimeType = lower_call.hasCastWithRuntimeType;
|
||||
pub const lowerRuntimeDispatchCall = lower_call.lowerRuntimeDispatchCall;
|
||||
pub const tryLowerReflectionCall = lower_call.tryLowerReflectionCall;
|
||||
pub const tryLowerAtomicIntrinsic = lower_call.tryLowerAtomicIntrinsic;
|
||||
pub const reflectionArgIsType = lower_call.reflectionArgIsType;
|
||||
pub const reflectionTypeArgGuard = lower_call.reflectionTypeArgGuard;
|
||||
pub const reflectionErrorSentinel = lower_call.reflectionErrorSentinel;
|
||||
|
||||
Reference in New Issue
Block a user