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( ...@@ -2261,8 +2261,7 @@ JSNativeContextSpecialization::BuildPropertyStore(
value = effect = value = effect =
graph()->NewNode(simplified()->CheckNumber(VectorSlotPair()), value, graph()->NewNode(simplified()->CheckNumber(VectorSlotPair()), value,
effect, control); effect, control);
if (!field_index.is_inobject() || field_index.is_hidden_field() || if (!field_index.is_inobject() || !FLAG_unbox_double_fields) {
!FLAG_unbox_double_fields) {
if (access_info.HasTransitionMap()) { if (access_info.HasTransitionMap()) {
// Allocate a MutableHeapNumber for the new property. // Allocate a MutableHeapNumber for the new property.
AllocationBuilder a(jsgraph(), effect, control); AllocationBuilder a(jsgraph(), effect, control);
......
...@@ -211,8 +211,7 @@ Node* PropertyAccessBuilder::BuildLoadDataField( ...@@ -211,8 +211,7 @@ Node* PropertyAccessBuilder::BuildLoadDataField(
LoadSensitivity::kCritical, LoadSensitivity::kCritical,
constness}; constness};
if (field_representation == MachineRepresentation::kFloat64) { if (field_representation == MachineRepresentation::kFloat64) {
if (!field_index.is_inobject() || field_index.is_hidden_field() || if (!field_index.is_inobject() || !FLAG_unbox_double_fields) {
!FLAG_unbox_double_fields) {
FieldAccess const storage_access = { FieldAccess const storage_access = {
kTaggedBase, kTaggedBase,
field_index.offset(), field_index.offset(),
......
...@@ -33,8 +33,6 @@ class FieldIndex final { ...@@ -33,8 +33,6 @@ class FieldIndex final {
bool is_inobject() const { return IsInObjectBits::decode(bit_field_); } 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; } bool is_double() const { return EncodingBits::decode(bit_field_) == kDouble; }
int offset() const { return OffsetBits::decode(bit_field_); } int offset() const { return OffsetBits::decode(bit_field_); }
...@@ -53,7 +51,6 @@ class FieldIndex final { ...@@ -53,7 +51,6 @@ class FieldIndex final {
// Zero-based from the first inobject property. Overflows to out-of-object // Zero-based from the first inobject property. Overflows to out-of-object
// properties. // properties.
int property_index() const { int property_index() const {
DCHECK(!is_hidden_field());
int result = index() - first_inobject_property_offset() / kTaggedSize; int result = index() - first_inobject_property_offset() / kTaggedSize;
if (!is_inobject()) { if (!is_inobject()) {
result += InObjectPropertyBits::decode(bit_field_); result += InObjectPropertyBits::decode(bit_field_);
...@@ -73,14 +70,13 @@ class FieldIndex final { ...@@ -73,14 +70,13 @@ class FieldIndex final {
private: private:
FieldIndex(bool is_inobject, int offset, Encoding encoding, FieldIndex(bool is_inobject, int offset, Encoding encoding,
int inobject_properties, int first_inobject_property_offset, int inobject_properties, int first_inobject_property_offset) {
bool is_hidden = false) {
DCHECK(IsAligned(first_inobject_property_offset, kTaggedSize)); DCHECK(IsAligned(first_inobject_property_offset, kTaggedSize));
bit_field_ = IsInObjectBits::encode(is_inobject) | bit_field_ = IsInObjectBits::encode(is_inobject) |
EncodingBits::encode(encoding) | EncodingBits::encode(encoding) |
FirstInobjectPropertyOffsetBits::encode( FirstInobjectPropertyOffsetBits::encode(
first_inobject_property_offset) | first_inobject_property_offset) |
IsHiddenField::encode(is_hidden) | OffsetBits::encode(offset) | OffsetBits::encode(offset) |
InObjectPropertyBits::encode(inobject_properties); InObjectPropertyBits::encode(inobject_properties);
} }
...@@ -102,7 +98,6 @@ class FieldIndex final { ...@@ -102,7 +98,6 @@ class FieldIndex final {
} }
int first_inobject_property_offset() const { int first_inobject_property_offset() const {
DCHECK(!is_hidden_field());
return FirstInobjectPropertyOffsetBits::decode(bit_field_); return FirstInobjectPropertyOffsetBits::decode(bit_field_);
} }
...@@ -121,9 +116,7 @@ class FieldIndex final { ...@@ -121,9 +116,7 @@ class FieldIndex final {
class FirstInobjectPropertyOffsetBits class FirstInobjectPropertyOffsetBits
: public BitField64<int, InObjectPropertyBits::kNext, : public BitField64<int, InObjectPropertyBits::kNext,
kFirstInobjectPropertyOffsetBitCount> {}; kFirstInobjectPropertyOffsetBitCount> {};
class IsHiddenField STATIC_ASSERT(FirstInobjectPropertyOffsetBits::kNext <= 64);
: public BitField64<bool, FirstInobjectPropertyOffsetBits::kNext, 1> {};
STATIC_ASSERT(IsHiddenField::kNext <= 64);
uint64_t bit_field_; uint64_t bit_field_;
}; };
......
...@@ -138,7 +138,7 @@ void Map::GeneralizeIfCanHaveTransitionableFastElementsKind( ...@@ -138,7 +138,7 @@ void Map::GeneralizeIfCanHaveTransitionableFastElementsKind(
bool Map::IsUnboxedDoubleField(FieldIndex index) const { bool Map::IsUnboxedDoubleField(FieldIndex index) const {
if (!FLAG_unbox_double_fields) return false; 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()); 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