You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Flow 2.0] Value semantics with compiler-inferred move defaults #696
Flow uses value semantics for structs. For larger buffers and complex resources, deep copying can incur performance penalties, while manual move semantics add syntax verbosity.
This issue tracks automated move inference where the compiler treats final uses of unique bindings as moves and applies copy-on-write or sharing when safety is established.
Deliverables
Analyze liveness to detect last uses of uniquely owned values.
Elide copies at codegen time by lowering last uses into moves.
Provide predictable performance characteristics without explicit move keywords.
Reference implementation against the retired Python compiler: tag archive/perf/696-move-inference (4626927). Useful as a design starting point for the Flow implementation.
Design decision, 2026-10-07, decided by the project owner (#1354): option 1. No move keyword, no copy-on-write or implicit sharing. Moves are inferred only at a proven last use of a uniquely owned function-scoped local or by-value parameter. Observable value semantics are unchanged; the move is a pure optimisation. #1354 merges after #1367. Recorded in docs/project/Questions.md by #1422.
Activity
godofecht commentedon Oct 1, 2026
Reference implementation against the retired Python compiler: tag archive/perf/696-move-inference (4626927). Useful as a design starting point for the Flow implementation.
test(lang): prove value semantics for structs and primitives (#696)
fix: regenerate bootstrap C after last-use move inference
godofecht commentedon Oct 7, 2026
Design decision, 2026-10-07, decided by the project owner (#1354): option 1. No
movekeyword, no copy-on-write or implicit sharing. Moves are inferred only at a proven last use of a uniquely owned function-scoped local or by-value parameter. Observable value semantics are unchanged; the move is a pure optimisation. #1354 merges after #1367. Recorded in docs/project/Questions.md by #1422.Perf: move of a returned record update of a local base in MLIR (#696)
fix(mlir): make the record-update return move reachable and sound (#696)
tests(mlir): golden for the record-update return move (#696)
fix: regenerate bootstrap C after the MLIR record-update return move (#…
tests(mlir): parity goldens for record_update_return and the copy_eli…
Perf: move of a returned record update of a local base in MLIR (#696)
fix(mlir): make the record-update return move reachable and sound (#696)
tests(mlir): golden for the record-update return move (#696)
fix: regenerate bootstrap C after the MLIR record-update return move (#…
tests(mlir): parity goldens for record_update_return and the copy_eli…
Perf: move of a returned record update of a local base in MLIR (#696) (…
feat: infer last-use moves for unique record updates (#696)
feat: infer last-use moves for unique record updates (#696)
feat: infer last-use moves for unique record updates (#696)