mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This is a new instruction that can be used by SILGen to perform a semantic move in between two entities that are considered separate variables at the AST level. I am going to use it to implement an experimental borrow checker. This PR contains the following: 1. I define move_value, setup parsing, printing, serializing, deserializing, cloning, and filled in all of the visitors as appropriate. 2. I added createMoveValue and emitMoveValueOperation SILBuilder APIs. createMoveValue always creates a move and asserts is passed a trivial type. emitMoveValueOperation in contrast, will short circuit if passed a trivial value and just return the trivial value. 3. I added IRGen tests to show that we can push this through the entire system. This is all just scaffolding for the instruction to live in SIL land and as of this PR doesn't actually do anything.
65 KiB
65 KiB