mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-28 06:53:42 +08:00
emitInlineAtomicsOp read its typed array with emitExpr, so every Atomics call on a local array retained the array before the atomic instruction and released it after, two out-of-line calls around one instruction. The array now goes through emitBorrowedInput: an unchanged, unboxed local owns it across the later operands and the operation, and the instruction and scr_atomics_op only read it. Fields, globals, captures and bindings an operand can reassign keep their own reference.