tint/reader/wgsl: Restructure Lexer::try_hex_float() constants
No-op change. Just makes it easier to migrate to float64. Bug: tint:1504 Change-Id: Ice5bf40514bc7f7faf30e51e4b1e22e6cf2375ad Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91424 Reviewed-by: David Neto <dneto@google.com> Commit-Queue: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
This commit is contained in:
parent
3ad927cc73
commit
8ae9e94344
|
@ -387,17 +387,17 @@ Token Lexer::try_float() {
|
|||
}
|
||||
|
||||
Token Lexer::try_hex_float() {
|
||||
constexpr uint32_t kTotalBits = 32;
|
||||
constexpr uint32_t kTotalMsb = kTotalBits - 1;
|
||||
constexpr uint32_t kExponentBits = 8;
|
||||
constexpr uint32_t kMantissaBits = 23;
|
||||
constexpr uint32_t kTotalBits = 1 + kExponentBits + kMantissaBits;
|
||||
constexpr uint32_t kTotalMsb = kTotalBits - 1;
|
||||
constexpr uint32_t kMantissaMsb = kMantissaBits - 1;
|
||||
constexpr uint32_t kMantissaShiftRight = kTotalBits - kMantissaBits;
|
||||
constexpr int32_t kExponentBias = 127;
|
||||
constexpr int32_t kExponentMax = 255;
|
||||
constexpr uint32_t kExponentBits = 8;
|
||||
constexpr uint32_t kExponentMask = (1 << kExponentBits) - 1;
|
||||
constexpr int32_t kExponentMax = kExponentMask; // Including NaN / inf
|
||||
constexpr uint32_t kExponentLeftShift = kMantissaBits;
|
||||
constexpr uint32_t kSignBit = 31;
|
||||
constexpr uint32_t kSignBit = kTotalBits - 1;
|
||||
|
||||
auto start = pos();
|
||||
auto end = pos();
|
||||
|
|
Loading…
Reference in New Issue