Commit bd6880bc authored by Georg Neis's avatar Georg Neis Committed by V8 LUCI CQ

[compiler] Make a few Ref methods more robust

... by recording dependencies not based on whether the caller
remembered to pass non-null CompilationDependencies* but on whether
the method is called in serialization mode or not.

Bug: v8:7790
Change-Id: I841fe8fab57e94fff03dc3ce8dc8a02c49677560
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3009223
Commit-Queue: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarSantiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75610}
parent e2a4515c
......@@ -3685,8 +3685,9 @@ base::Optional<ObjectRef> JSObjectRef::GetOwnConstantElement(
base::Optional<ObjectRef> result =
TryMakeRef(broker(), maybe_element.value());
if (dependencies != nullptr && result.has_value()) {
dependencies->DependOnOwnConstantElement(*this, index, result.value());
if (policy == SerializationPolicy::kAssumeSerialized &&
result.has_value()) {
dependencies->DependOnOwnConstantElement(*this, index, *result);
}
return result;
} else {
......@@ -3746,7 +3747,8 @@ base::Optional<ObjectRef> JSObjectRef::GetOwnFastDataProperty(
if (data_->should_access_heap() || broker()->is_concurrent_inlining()) {
base::Optional<ObjectRef> result = GetOwnFastDataPropertyFromHeap(
broker(), *this, field_representation, index);
if (dependencies != nullptr && result.has_value()) {
if (policy == SerializationPolicy::kAssumeSerialized &&
result.has_value()) {
dependencies->DependOnOwnConstantDataProperty(
*this, map(), field_representation, index, *result);
}
......@@ -3764,7 +3766,8 @@ base::Optional<ObjectRef> JSObjectRef::GetOwnDictionaryProperty(
if (data_->should_access_heap() || broker()->is_concurrent_inlining()) {
base::Optional<ObjectRef> result =
GetOwnDictionaryPropertyFromHeap(broker(), object(), index);
if (dependencies != nullptr && result.has_value()) {
if (policy == SerializationPolicy::kAssumeSerialized &&
result.has_value()) {
dependencies->DependOnOwnConstantDictionaryProperty(*this, index,
*result);
}
......
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