Commit be3a6690 authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[compiler] Perform FindFieldOwner concurrently through Refs

Also, enable concurrent GetBackPointer().

Bug: v8:7790
Change-Id: If92cb7cdd9e6f5eb9a636764ca8abe2fc2c05ab2
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2650205
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#72483}
parent 26653f89
...@@ -3181,11 +3181,12 @@ bool MapRef::IsPrimitiveMap() const { ...@@ -3181,11 +3181,12 @@ bool MapRef::IsPrimitiveMap() const {
} }
MapRef MapRef::FindFieldOwner(InternalIndex descriptor_index) const { MapRef MapRef::FindFieldOwner(InternalIndex descriptor_index) const {
if (data_->should_access_heap()) { if (data_->should_access_heap() || FLAG_turbo_direct_heap_access) {
Handle<Map> owner( // TODO(solanes, v8:7790): Consider caching the result of the field owner on
object()->FindFieldOwner(broker()->isolate(), descriptor_index), // the descriptor array. It would be useful for same map as well as any
broker()->isolate()); // other map sharing that descriptor array.
return MapRef(broker(), owner); return MapRef(broker(), broker()->GetOrCreateData(object()->FindFieldOwner(
broker()->isolate(), descriptor_index)));
} }
DescriptorArrayData* descriptors = DescriptorArrayData* descriptors =
data()->AsMap()->instance_descriptors()->AsDescriptorArray(); data()->AsMap()->instance_descriptors()->AsDescriptorArray();
...@@ -3476,7 +3477,7 @@ BIMODAL_ACCESSOR_C(Map, int, UnusedPropertyFields) ...@@ -3476,7 +3477,7 @@ BIMODAL_ACCESSOR_C(Map, int, UnusedPropertyFields)
BIMODAL_ACCESSOR(Map, HeapObject, prototype) BIMODAL_ACCESSOR(Map, HeapObject, prototype)
BIMODAL_ACCESSOR_C(Map, InstanceType, instance_type) BIMODAL_ACCESSOR_C(Map, InstanceType, instance_type)
BIMODAL_ACCESSOR(Map, Object, GetConstructor) BIMODAL_ACCESSOR(Map, Object, GetConstructor)
BIMODAL_ACCESSOR(Map, HeapObject, GetBackPointer) BIMODAL_ACCESSOR_WITH_FLAG(Map, HeapObject, GetBackPointer)
BIMODAL_ACCESSOR_C(Map, bool, is_abandoned_prototype_map) BIMODAL_ACCESSOR_C(Map, bool, is_abandoned_prototype_map)
BIMODAL_ACCESSOR_C(Code, unsigned, inlined_bytecode_size) BIMODAL_ACCESSOR_C(Code, unsigned, inlined_bytecode_size)
......
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