[compiler] Set/Get the Map's inobject properties start non-atomically
The property kInObjectPropertiesStartOrConstructorFunctionIndexOffset was set as relaxed due to races with the layout_descriptor (https://chromium-review.googlesource.com/c/v8/v8/+/555210/). The layout_descriptor was removed with the removal of double field unboxing. We are able to turn those property's accessors into non-atomic ones since they are set at construction time. Bug: v8:7790 Change-Id: I25c53f0e00718cca72ba86f8475af9ecefb7ba3d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2843359 Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#74174}
This commit is contained in:
parent
84e144fe71
commit
8e73532460
@ -3109,7 +3109,7 @@ FieldIndex MapRef::GetFieldIndexFor(InternalIndex descriptor_index) const {
|
||||
}
|
||||
|
||||
int MapRef::GetInObjectPropertyOffset(int i) const {
|
||||
if (data_->should_access_heap()) {
|
||||
if (data_->should_access_heap() || broker()->is_concurrent_inlining()) {
|
||||
return object()->GetInObjectPropertyOffset(i);
|
||||
}
|
||||
return (GetInObjectPropertiesStartInWords() + i) * kTaggedSize;
|
||||
@ -3699,7 +3699,7 @@ bool MapRef::IsInobjectSlackTrackingInProgress() const {
|
||||
}
|
||||
|
||||
int MapRef::constructor_function_index() const {
|
||||
IF_ACCESS_FROM_HEAP_C(GetConstructorFunctionIndex);
|
||||
IF_ACCESS_FROM_HEAP_WITH_FLAG_C(GetConstructorFunctionIndex);
|
||||
CHECK(IsPrimitiveMap());
|
||||
return data()->AsMap()->constructor_function_index();
|
||||
}
|
||||
@ -3721,7 +3721,7 @@ bool MapRef::CanTransition() const {
|
||||
}
|
||||
|
||||
int MapRef::GetInObjectPropertiesStartInWords() const {
|
||||
IF_ACCESS_FROM_HEAP_C(GetInObjectPropertiesStartInWords);
|
||||
IF_ACCESS_FROM_HEAP_WITH_FLAG_C(GetInObjectPropertiesStartInWords);
|
||||
return data()->AsMap()->in_object_properties_start_in_words();
|
||||
}
|
||||
|
||||
|
@ -277,15 +277,14 @@ void Map::set_instance_size(int value) {
|
||||
}
|
||||
|
||||
int Map::inobject_properties_start_or_constructor_function_index() const {
|
||||
return RELAXED_READ_BYTE_FIELD(
|
||||
*this, kInObjectPropertiesStartOrConstructorFunctionIndexOffset);
|
||||
return ReadField<byte>(
|
||||
kInObjectPropertiesStartOrConstructorFunctionIndexOffset);
|
||||
}
|
||||
|
||||
void Map::set_inobject_properties_start_or_constructor_function_index(
|
||||
int value) {
|
||||
CHECK_LT(static_cast<unsigned>(value), 256);
|
||||
RELAXED_WRITE_BYTE_FIELD(
|
||||
*this, kInObjectPropertiesStartOrConstructorFunctionIndexOffset,
|
||||
WriteField<byte>(kInObjectPropertiesStartOrConstructorFunctionIndexOffset,
|
||||
static_cast<byte>(value));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user