Commit 88de5b0f authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[objects] Remove RawFastPropertyAtPut

After after double field unboxing deletion, there was no need for this
method.

Bug: v8:11422
Change-Id: I540ffc80ad21c4cfec62fd8c80a343b8b8eed4bc
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2691047
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72708}
parent bc403dcb
...@@ -327,8 +327,8 @@ void JSObject::RawFastInobjectPropertyAtPut(FieldIndex index, Object value, ...@@ -327,8 +327,8 @@ void JSObject::RawFastInobjectPropertyAtPut(FieldIndex index, Object value,
CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode); CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode);
} }
void JSObject::RawFastPropertyAtPut(FieldIndex index, Object value, void JSObject::FastPropertyAtPut(FieldIndex index, Object value,
WriteBarrierMode mode) { WriteBarrierMode mode) {
if (index.is_inobject()) { if (index.is_inobject()) {
RawFastInobjectPropertyAtPut(index, value, mode); RawFastInobjectPropertyAtPut(index, value, mode);
} else { } else {
...@@ -337,10 +337,6 @@ void JSObject::RawFastPropertyAtPut(FieldIndex index, Object value, ...@@ -337,10 +337,6 @@ void JSObject::RawFastPropertyAtPut(FieldIndex index, Object value,
} }
} }
void JSObject::FastPropertyAtPut(FieldIndex index, Object value) {
RawFastPropertyAtPut(index, value);
}
void JSObject::WriteToField(InternalIndex descriptor, PropertyDetails details, void JSObject::WriteToField(InternalIndex descriptor, PropertyDetails details,
Object value) { Object value) {
DCHECK_EQ(kField, details.location()); DCHECK_EQ(kField, details.location());
...@@ -364,7 +360,7 @@ void JSObject::WriteToField(InternalIndex descriptor, PropertyDetails details, ...@@ -364,7 +360,7 @@ void JSObject::WriteToField(InternalIndex descriptor, PropertyDetails details,
auto box = HeapNumber::cast(RawFastPropertyAt(index)); auto box = HeapNumber::cast(RawFastPropertyAt(index));
box.set_value_as_bits(bits); box.set_value_as_bits(bits);
} else { } else {
RawFastPropertyAtPut(index, value); FastPropertyAtPut(index, value);
} }
} }
......
...@@ -2781,7 +2781,7 @@ void MigrateFastToFast(Isolate* isolate, Handle<JSObject> object, ...@@ -2781,7 +2781,7 @@ void MigrateFastToFast(Isolate* isolate, Handle<JSObject> object,
// Allocate HeapNumbers for double fields. // Allocate HeapNumbers for double fields.
if (index.is_double()) { if (index.is_double()) {
auto value = isolate->factory()->NewHeapNumberWithHoleNaN(); auto value = isolate->factory()->NewHeapNumberWithHoleNaN();
object->RawFastPropertyAtPut(index, *value); object->FastPropertyAtPut(index, *value);
} }
object->synchronized_set_map(*new_map); object->synchronized_set_map(*new_map);
return; return;
...@@ -2924,7 +2924,7 @@ void MigrateFastToFast(Isolate* isolate, Handle<JSObject> object, ...@@ -2924,7 +2924,7 @@ void MigrateFastToFast(Isolate* isolate, Handle<JSObject> object,
for (int i = 0; i < limit; i++) { for (int i = 0; i < limit; i++) {
FieldIndex index = FieldIndex::ForPropertyIndex(*new_map, i); FieldIndex index = FieldIndex::ForPropertyIndex(*new_map, i);
Object value = inobject_props->get(isolate, i); Object value = inobject_props->get(isolate, i);
object->RawFastPropertyAtPut(index, value); object->FastPropertyAtPut(index, value);
} }
object->SetProperties(*array); object->SetProperties(*array);
...@@ -3066,7 +3066,7 @@ void MigrateFastToSlow(Isolate* isolate, Handle<JSObject> object, ...@@ -3066,7 +3066,7 @@ void MigrateFastToSlow(Isolate* isolate, Handle<JSObject> object,
for (int i = 0; i < inobject_properties; i++) { for (int i = 0; i < inobject_properties; i++) {
FieldIndex index = FieldIndex::ForPropertyIndex(*new_map, i); FieldIndex index = FieldIndex::ForPropertyIndex(*new_map, i);
object->RawFastPropertyAtPut(index, Smi::zero()); object->FastPropertyAtPut(index, Smi::zero());
} }
} }
...@@ -3205,7 +3205,7 @@ void JSObject::AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map) { ...@@ -3205,7 +3205,7 @@ void JSObject::AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map) {
for (int i = 0; i < inobject; i++) { for (int i = 0; i < inobject; i++) {
FieldIndex index = FieldIndex::ForPropertyIndex(*map, i); FieldIndex index = FieldIndex::ForPropertyIndex(*map, i);
Object value = storage->get(i); Object value = storage->get(i);
object->RawFastPropertyAtPut(index, value); object->FastPropertyAtPut(index, value);
} }
object->synchronized_set_map(*map); object->synchronized_set_map(*map);
} }
......
...@@ -637,10 +637,8 @@ class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> { ...@@ -637,10 +637,8 @@ class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> {
inline Object RawFastPropertyAt(FieldIndex index) const; inline Object RawFastPropertyAt(FieldIndex index) const;
inline Object RawFastPropertyAt(IsolateRoot isolate, FieldIndex index) const; inline Object RawFastPropertyAt(IsolateRoot isolate, FieldIndex index) const;
inline void FastPropertyAtPut(FieldIndex index, Object value); inline void FastPropertyAtPut(FieldIndex index, Object value,
inline void RawFastPropertyAtPut( WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
FieldIndex index, Object value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
inline void RawFastInobjectPropertyAtPut( inline void RawFastInobjectPropertyAtPut(
FieldIndex index, Object value, FieldIndex index, Object value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER); WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
......
...@@ -55,8 +55,8 @@ Handle<JSRegExpResultIndices> JSRegExpResultIndices::BuildIndices( ...@@ -55,8 +55,8 @@ Handle<JSRegExpResultIndices> JSRegExpResultIndices::BuildIndices(
FieldIndex groups_index = FieldIndex::ForDescriptor( FieldIndex groups_index = FieldIndex::ForDescriptor(
indices->map(), InternalIndex(kGroupsDescriptorIndex)); indices->map(), InternalIndex(kGroupsDescriptorIndex));
if (maybe_names->IsUndefined(isolate)) { if (maybe_names->IsUndefined(isolate)) {
indices->RawFastPropertyAtPut(groups_index, indices->FastPropertyAtPut(groups_index,
ReadOnlyRoots(isolate).undefined_value()); ReadOnlyRoots(isolate).undefined_value());
return indices; return indices;
} }
...@@ -102,7 +102,7 @@ Handle<JSRegExpResultIndices> JSRegExpResultIndices::BuildIndices( ...@@ -102,7 +102,7 @@ Handle<JSRegExpResultIndices> JSRegExpResultIndices::BuildIndices(
Handle<JSObject> js_group_names = Handle<JSObject> js_group_names =
isolate->factory()->NewSlowJSObjectWithPropertiesAndElements( isolate->factory()->NewSlowJSObjectWithPropertiesAndElements(
null, group_names, elements); null, group_names, elements);
indices->RawFastPropertyAtPut(groups_index, *js_group_names); indices->FastPropertyAtPut(groups_index, *js_group_names);
return indices; return indices;
} }
......
...@@ -108,9 +108,8 @@ class Representation { ...@@ -108,9 +108,8 @@ class Representation {
// might cause a map deprecation. // might cause a map deprecation.
bool MightCauseMapDeprecation() const { bool MightCauseMapDeprecation() const {
// HeapObject to tagged representation change can be done in-place. // HeapObject to tagged representation change can be done in-place.
if (IsTagged() || IsHeapObject()) return false;
// Boxed double to tagged transition is always done in-place. // Boxed double to tagged transition is always done in-place.
if (IsDouble()) return false; if (IsTagged() || IsHeapObject() || IsDouble()) return false;
// None to double and smi to double representation changes require // None to double and smi to double representation changes require
// deprecation, because doubles might require box allocation, see // deprecation, because doubles might require box allocation, see
// CanBeInPlaceChangedTo(). // CanBeInPlaceChangedTo().
......
...@@ -164,7 +164,7 @@ bool DeleteObjectPropertyFast(Isolate* isolate, Handle<JSReceiver> receiver, ...@@ -164,7 +164,7 @@ bool DeleteObjectPropertyFast(Isolate* isolate, Handle<JSReceiver> receiver,
receiver->SetProperties(ReadOnlyRoots(isolate).empty_fixed_array()); receiver->SetProperties(ReadOnlyRoots(isolate).empty_fixed_array());
} else { } else {
Object filler = ReadOnlyRoots(isolate).one_pointer_filler_map(); Object filler = ReadOnlyRoots(isolate).one_pointer_filler_map();
JSObject::cast(*receiver).RawFastPropertyAtPut(index, filler); JSObject::cast(*receiver).FastPropertyAtPut(index, filler);
// We must clear any recorded slot for the deleted property, because // We must clear any recorded slot for the deleted property, because
// subsequent object modifications might put a raw double there. // subsequent object modifications might put a raw double there.
// Slot clearing is the reason why this entire function cannot currently // Slot clearing is the reason why this entire function cannot currently
......
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