Commit 3f035df2 authored by Jakob Gruber's avatar Jakob Gruber Committed by V8 LUCI CQ

[compiler] AssumeMemoryFence for a few refs

.. namely:

 AllocationSite::nested_site
 CodeHandlerInfo::data
 ScopeInfo::OuterScopeInfo

These are all immutable after initialization.

Bug: v8:7790,chromium:1237387
Change-Id: I73f1c366d9f4fa9ad721051dea668227ba987e63
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3080559Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Auto-Submit: Jakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#76152}
parent 5d18f75b
......@@ -2292,15 +2292,13 @@ int BytecodeArrayRef::handler_table_size() const {
return BitField::decode(ObjectRef::data()->As##holder()->field()); \
}
#define HEAP_ACCESSOR(holder, result, name) \
result##Ref holder##Ref::name() const { \
return MakeRef(broker(), result::cast(object()->name())); \
}
#define HEAP_ACCESSOR_C(holder, result, name) \
result holder##Ref::name() const { return object()->name(); }
HEAP_ACCESSOR(AllocationSite, Object, nested_site)
ObjectRef AllocationSiteRef::nested_site() const {
return MakeRefAssumeMemoryFence(broker(), object()->nested_site());
}
HEAP_ACCESSOR_C(AllocationSite, bool, CanInlineCall)
HEAP_ACCESSOR_C(AllocationSite, bool, PointsToLiteral)
HEAP_ACCESSOR_C(AllocationSite, ElementsKind, GetElementsKind)
......@@ -2473,12 +2471,17 @@ HolderLookupResult FunctionTemplateInfoRef::LookupHolderOfExpectedType(
prototype->AsJSObject());
}
HEAP_ACCESSOR(CallHandlerInfo, Object, data)
ObjectRef CallHandlerInfoRef::data() const {
return MakeRefAssumeMemoryFence(broker(), object()->data());
}
HEAP_ACCESSOR_C(ScopeInfo, int, ContextLength)
HEAP_ACCESSOR_C(ScopeInfo, bool, HasContextExtensionSlot)
HEAP_ACCESSOR_C(ScopeInfo, bool, HasOuterScopeInfo)
HEAP_ACCESSOR(ScopeInfo, ScopeInfo, OuterScopeInfo)
ScopeInfoRef ScopeInfoRef::OuterScopeInfo() const {
return MakeRefAssumeMemoryFence(broker(), object()->OuterScopeInfo());
}
HEAP_ACCESSOR_C(SharedFunctionInfo, Builtin, builtin_id)
......@@ -3388,7 +3391,6 @@ unsigned CodeRef::GetInlinedBytecodeSize() const {
#undef BIMODAL_ACCESSOR_WITH_FLAG
#undef BIMODAL_ACCESSOR_WITH_FLAG_B
#undef BIMODAL_ACCESSOR_WITH_FLAG_C
#undef HEAP_ACCESSOR
#undef HEAP_ACCESSOR_C
#undef IF_ACCESS_FROM_HEAP
#undef IF_ACCESS_FROM_HEAP_C
......
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