Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
[RFC FS-1014] Struct unions (single case) #1262
This PR implements support for F# RFC FS-1014 - struct unions, for single-case union types, e.g.
Putting this PR up for CI and visibility
So next step is to write the RFC and clear the last few test glitches
While looking over the code generated in some test cases, I noticed that the insertion of "copyOfStruct" values when taking the address of structs was always generating mutable locals. Mutable locals are less easy to eliminate in the optimizer. The locals can be immutable when the operation for which we're taking the address is
By adding this optimization the generated code becomes copy-free, see functions
Some of these issues are discussed in the RFC.