From a8739d5977b5c6acc7cfa1d6ef77f05467c1e757 Mon Sep 17 00:00:00 2001 From: Tobias Tebbi Date: Tue, 13 Jun 2023 11:50:11 +0200 Subject: [PATCH] Merged: [compiler] check for read-only property on AccessMode::kDefine (cherry picked from commit 95eda07ddbc1839e39b3d1ff5db329c0ceb6dfaa) Change-Id: I2000f5b008a473d50a8fbb181d96668ae7b6826f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4660572 Commit-Queue: Darius Mercadier Auto-Submit: Tobias Tebbi Reviewed-by: Darius Mercadier Cr-Commit-Position: refs/branch-heads/11.5@{#31} Cr-Branched-From: 0c4044b7336787781646e48b2f98f0c7d1b400a5-refs/heads/11.5.150@{#1} Cr-Branched-From: b71d3038a7d99c79e1c21239e8ae07da5fc8c90b-refs/heads/main@{#87781} --- src/compiler/access-info.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/compiler/access-info.cc b/src/compiler/access-info.cc index 2f53e7d7082f..cb5cd9525488 100644 --- a/src/compiler/access-info.cc +++ b/src/compiler/access-info.cc @@ -757,8 +757,7 @@ PropertyAccessInfo AccessInfoFactory::ComputePropertyAccessInfo( } if (index.is_found()) { - if (access_mode == AccessMode::kStore || - access_mode == AccessMode::kStoreInLiteral) { + if (IsAnyStore(access_mode)) { DCHECK(!map.is_dictionary_map()); // Don't bother optimizing stores to read-only properties.