Commit 9e5741a5 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[runtime] Remove unused FieldIndex::is_hidden_field

Change-Id: Ie4e12c8b65430a62f7ec045a28417f42e35a4c99
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1632070Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61873}
parent c6077bf1
......@@ -2261,8 +2261,7 @@ JSNativeContextSpecialization::BuildPropertyStore(
value = effect =
graph()->NewNode(simplified()->CheckNumber(VectorSlotPair()), value,
effect, control);
if (!field_index.is_inobject() || field_index.is_hidden_field() ||
!FLAG_unbox_double_fields) {
if (!field_index.is_inobject() || !FLAG_unbox_double_fields) {
if (access_info.HasTransitionMap()) {
// Allocate a MutableHeapNumber for the new property.
AllocationBuilder a(jsgraph(), effect, control);
......
......@@ -211,8 +211,7 @@ Node* PropertyAccessBuilder::BuildLoadDataField(
LoadSensitivity::kCritical,
constness};
if (field_representation == MachineRepresentation::kFloat64) {
if (!field_index.is_inobject() || field_index.is_hidden_field() ||
!FLAG_unbox_double_fields) {
if (!field_index.is_inobject() || !FLAG_unbox_double_fields) {
FieldAccess const storage_access = {
kTaggedBase,
field_index.offset(),
......
......@@ -33,8 +33,6 @@ class FieldIndex final {
bool is_inobject() const { return IsInObjectBits::decode(bit_field_); }
bool is_hidden_field() const { return IsHiddenField::decode(bit_field_); }
bool is_double() const { return EncodingBits::decode(bit_field_) == kDouble; }
int offset() const { return OffsetBits::decode(bit_field_); }
......@@ -53,7 +51,6 @@ class FieldIndex final {
// Zero-based from the first inobject property. Overflows to out-of-object
// properties.
int property_index() const {
DCHECK(!is_hidden_field());
int result = index() - first_inobject_property_offset() / kTaggedSize;
if (!is_inobject()) {
result += InObjectPropertyBits::decode(bit_field_);
......@@ -73,14 +70,13 @@ class FieldIndex final {
private:
FieldIndex(bool is_inobject, int offset, Encoding encoding,
int inobject_properties, int first_inobject_property_offset,
bool is_hidden = false) {
int inobject_properties, int first_inobject_property_offset) {
DCHECK(IsAligned(first_inobject_property_offset, kTaggedSize));
bit_field_ = IsInObjectBits::encode(is_inobject) |
EncodingBits::encode(encoding) |
FirstInobjectPropertyOffsetBits::encode(
first_inobject_property_offset) |
IsHiddenField::encode(is_hidden) | OffsetBits::encode(offset) |
OffsetBits::encode(offset) |
InObjectPropertyBits::encode(inobject_properties);
}
......@@ -102,7 +98,6 @@ class FieldIndex final {
}
int first_inobject_property_offset() const {
DCHECK(!is_hidden_field());
return FirstInobjectPropertyOffsetBits::decode(bit_field_);
}
......@@ -121,9 +116,7 @@ class FieldIndex final {
class FirstInobjectPropertyOffsetBits
: public BitField64<int, InObjectPropertyBits::kNext,
kFirstInobjectPropertyOffsetBitCount> {};
class IsHiddenField
: public BitField64<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {};
STATIC_ASSERT(IsHiddenField::kNext <= 64);
STATIC_ASSERT(FirstInobjectPropertyOffsetBits::kNext <= 64);
uint64_t bit_field_;
};
......
......@@ -138,7 +138,7 @@ void Map::GeneralizeIfCanHaveTransitionableFastElementsKind(
bool Map::IsUnboxedDoubleField(FieldIndex index) const {
if (!FLAG_unbox_double_fields) return false;
if (index.is_hidden_field() || !index.is_inobject()) return false;
if (!index.is_inobject()) return false;
return !layout_descriptor().IsTagged(index.property_index());
}
......
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