Commit f6375150 authored by Ross McIlroy's avatar Ross McIlroy Committed by V8 LUCI CQ

[compiler] Revert to non-bitfields for Truncation fields.

Reverts part of the change https://chromium-review.googlesource.com/c/v8/v8/+/2892664
to avoid using bitfields for Truncation since it causes older versions of gcc
to report a warning.

BUG=v8:9684

Change-Id: Ia807d6dbbb5ae1baae73bf5816c336b9b80ae83d
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2900660
Auto-Submit: Ross McIlroy <rmcilroy@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#74624}
parent 8c0bd711
......@@ -17,10 +17,6 @@ namespace compiler {
class TypeCache;
enum IdentifyZeros : uint8_t { kIdentifyZeros, kDistinguishZeros };
constexpr int kIdentifyZerosBits = 1;
static_assert(static_cast<int>(IdentifyZeros::kDistinguishZeros) <
1 << kIdentifyZerosBits,
"kIdentifyZeros must fit into kIdentifyZerosBits");
class Truncation final {
public:
......@@ -98,10 +94,6 @@ class Truncation final {
kOddballAndBigIntToNumber,
kAny
};
static constexpr int kTruncationKindBits = 4;
static_assert(static_cast<int>(TruncationKind::kAny) <
1 << kTruncationKindBits,
"TransactionKind must fit into kTruncationKindBits");
explicit Truncation(TruncationKind kind, IdentifyZeros identify_zeros)
: kind_(kind), identify_zeros_(identify_zeros) {
......@@ -111,8 +103,8 @@ class Truncation final {
}
TruncationKind kind() const { return kind_; }
TruncationKind kind_ : kTruncationKindBits;
IdentifyZeros identify_zeros_ : kIdentifyZerosBits;
TruncationKind kind_;
IdentifyZeros identify_zeros_;
static TruncationKind Generalize(TruncationKind rep1, TruncationKind rep2);
static IdentifyZeros GeneralizeIdentifyZeros(IdentifyZeros i1,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment