Commit 4093cf3e authored by Santiago Aboy Solanes's avatar Santiago Aboy Solanes Committed by Commit Bot

[compiler] Partially replace SourceTextModule with direct reads

Replace the SourceTextModuleRef::GetCell method.

Bug: v8:7790
Change-Id: I65e2f121b9d37c39e5d208d68409f61724ce198e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2410192Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Commit-Queue: Santiago Aboy Solanes <solanes@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69966}
parent 0c591684
......@@ -3889,11 +3889,11 @@ base::Optional<ObjectRef> JSArrayRef::GetOwnCowElement(
}
base::Optional<CellRef> SourceTextModuleRef::GetCell(int cell_index) const {
if (data_->should_access_heap()) {
AllowHandleAllocationIfNeeded allow_handle_allocation(data()->kind(),
broker()->mode());
AllowHandleDereferenceIfNeeded allow_handle_dereference(data()->kind(),
broker()->mode());
if (data_->should_access_heap() || FLAG_turbo_direct_heap_access) {
AllowHandleAllocationIfNeeded allow_handle_allocation(
data()->kind(), broker()->mode(), FLAG_turbo_direct_heap_access);
AllowHandleDereferenceIfNeeded allow_handle_dereference(
data()->kind(), broker()->mode(), FLAG_turbo_direct_heap_access);
return CellRef(broker(), broker()->CanonicalPersistentHandle(
object()->GetCell(cell_index)));
}
......
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