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,
CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode);
}
void JSObject::RawFastPropertyAtPut(FieldIndex index, Object value,
WriteBarrierMode mode) {
void JSObject::FastPropertyAtPut(FieldIndex index, Object value,
WriteBarrierMode mode) {
if (index.is_inobject()) {
RawFastInobjectPropertyAtPut(index, value, mode);
} else {
......@@ -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,
Object value) {
DCHECK_EQ(kField, details.location());
......@@ -364,7 +360,7 @@ void JSObject::WriteToField(InternalIndex descriptor, PropertyDetails details,
auto box = HeapNumber::cast(RawFastPropertyAt(index));
box.set_value_as_bits(bits);
} else {
RawFastPropertyAtPut(index, value);
FastPropertyAtPut(index, value);
}
}
......
......@@ -2781,7 +2781,7 @@ void MigrateFastToFast(Isolate* isolate, Handle<JSObject> object,
// Allocate HeapNumbers for double fields.
if (index.is_double()) {
auto value = isolate->factory()->NewHeapNumberWithHoleNaN();
object->RawFastPropertyAtPut(index, *value);
object->FastPropertyAtPut(index, *value);
}
object->synchronized_set_map(*new_map);
return;
......@@ -2924,7 +2924,7 @@ void MigrateFastToFast(Isolate* isolate, Handle<JSObject> object,
for (int i = 0; i < limit; i++) {
FieldIndex index = FieldIndex::ForPropertyIndex(*new_map, i);
Object value = inobject_props->get(isolate, i);
object->RawFastPropertyAtPut(index, value);
object->FastPropertyAtPut(index, value);
}
object->SetProperties(*array);
......@@ -3066,7 +3066,7 @@ void MigrateFastToSlow(Isolate* isolate, Handle<JSObject> object,
for (int i = 0; i < inobject_properties; 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) {
for (int i = 0; i < inobject; i++) {
FieldIndex index = FieldIndex::ForPropertyIndex(*map, i);
Object value = storage->get(i);
object->RawFastPropertyAtPut(index, value);
object->FastPropertyAtPut(index, value);
}
object->synchronized_set_map(*map);
}
......
......@@ -637,10 +637,8 @@ class JSObject : public TorqueGeneratedJSObject<JSObject, JSReceiver> {
inline Object RawFastPropertyAt(FieldIndex index) const;
inline Object RawFastPropertyAt(IsolateRoot isolate, FieldIndex index) const;
inline void FastPropertyAtPut(FieldIndex index, Object value);
inline void RawFastPropertyAtPut(
FieldIndex index, Object value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
inline void FastPropertyAtPut(FieldIndex index, Object value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
inline void RawFastInobjectPropertyAtPut(
FieldIndex index, Object value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
......
......@@ -55,8 +55,8 @@ Handle<JSRegExpResultIndices> JSRegExpResultIndices::BuildIndices(
FieldIndex groups_index = FieldIndex::ForDescriptor(
indices->map(), InternalIndex(kGroupsDescriptorIndex));
if (maybe_names->IsUndefined(isolate)) {
indices->RawFastPropertyAtPut(groups_index,
ReadOnlyRoots(isolate).undefined_value());
indices->FastPropertyAtPut(groups_index,
ReadOnlyRoots(isolate).undefined_value());
return indices;
}
......@@ -102,7 +102,7 @@ Handle<JSRegExpResultIndices> JSRegExpResultIndices::BuildIndices(
Handle<JSObject> js_group_names =
isolate->factory()->NewSlowJSObjectWithPropertiesAndElements(
null, group_names, elements);
indices->RawFastPropertyAtPut(groups_index, *js_group_names);
indices->FastPropertyAtPut(groups_index, *js_group_names);
return indices;
}
......
......@@ -108,9 +108,8 @@ class Representation {
// might cause a map deprecation.
bool MightCauseMapDeprecation() const {
// 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.
if (IsDouble()) return false;
if (IsTagged() || IsHeapObject() || IsDouble()) return false;
// None to double and smi to double representation changes require
// deprecation, because doubles might require box allocation, see
// CanBeInPlaceChangedTo().
......
......@@ -164,7 +164,7 @@ bool DeleteObjectPropertyFast(Isolate* isolate, Handle<JSReceiver> receiver,
receiver->SetProperties(ReadOnlyRoots(isolate).empty_fixed_array());
} else {
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
// subsequent object modifications might put a raw double there.
// 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