This change is a renaming with no functional changes.
It includes the following renames:
* `val` for arguments that replace the atomic value (e.g., `Store`).
* `delta` for arguments that offset the atomic value (e.g., `Add`).
* `old`, `new` for arguments to `CAS`.
* `old` named return from `Swap`.
* `swapped` for named return from `CAS`.
This also matches the names used in the stdlib atomic interface:
https://golang.org/pkg/sync/atomic/
Float64 wraps a Uint64, and since Uint64 supports Swap, Float64 can also
support Swap. Enable the Swap method in the generated code, and add
tests.
This also adds a note for why String doesn't support Swap (though it
will be possible after Go 1.17+).
NaN != NaN when using Go's inbuilt operator, but the same is not true
when used with Float64.CAS. Add a note calling this out.
Changing this would be a behaviour change (requires a major version
bump), and is likely unsafe as it could lead to typical CAS loops
blocking forever.
To add the note, we copy the generated CAS method and extend the
documentation as the generator does not support per-method
customizations on the doc comments.
Generate atomic.Float64 with gen-valuewrapper by wrapping atomic.Uint64,
using math.Float64bits and math.Float64frombits to pack and unpack
float64 to uint64.