Commit 9ef9e00b authored by Mike Stanton's avatar Mike Stanton Committed by V8 LUCI CQ

[compiler] Use MakeRefAssumeMemoryFence around closure initial map

The field in JSFunction uses acquire-release semantics, therefore
the read is store-ordered.

Bug: v8:7790, v8:12282
Change-Id: Ic6e9d02e7aca1ca68c74502c3afed6eb6e964975
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3201992Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Michael Stanton <mvstanton@chromium.org>
Cr-Commit-Position: refs/heads/main@{#77218}
parent bbf476e7
...@@ -168,7 +168,9 @@ base::Optional<Node*> PropertyAccessBuilder::FoldLoadDictPrototypeConstant( ...@@ -168,7 +168,9 @@ base::Optional<Node*> PropertyAccessBuilder::FoldLoadDictPrototypeConstant(
Map::GetConstructorFunction( Map::GetConstructorFunction(
*map_handle, *broker()->target_native_context().object()) *map_handle, *broker()->target_native_context().object())
.value(); .value();
map = MakeRef(broker(), constructor.initial_map()); // {constructor.initial_map()} is loaded/stored with acquire-release
// semantics for constructors.
map = MakeRefAssumeMemoryFence(broker(), constructor.initial_map());
DCHECK(map.object()->IsJSObjectMap()); DCHECK(map.object()->IsJSObjectMap());
} }
dependencies()->DependOnConstantInDictionaryPrototypeChain( dependencies()->DependOnConstantInDictionaryPrototypeChain(
......
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