-
Notifications
You must be signed in to change notification settings - Fork 15k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: cherry-pick ec236fef54b8 from v8 (#36226)
* chore: [20-x-y] cherry-pick ec236fef54b8 from v8 * chore: update patches Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
- Loading branch information
1 parent
bc3d0bf
commit b9d0a5a
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Tobias Tebbi <tebbi@chromium.org> | ||
Date: Wed, 26 Oct 2022 11:19:59 +0200 | ||
Subject: Merged: [turbofan] do not optimize any stores for field type None | ||
|
||
Fixed: chromium:1378239 | ||
(cherry picked from commit db83e72034c0d431ff2f73e3c4ae3130c0f3e4e1) | ||
|
||
Change-Id: I061d5dfe6e4ee24e6d0e7df56e15fbe37752d51e | ||
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3982254 | ||
Reviewed-by: Tobias Tebbi <tebbi@chromium.org> | ||
Commit-Queue: Igor Sheludko <ishell@chromium.org> | ||
Cr-Commit-Position: refs/branch-heads/10.6@{#45} | ||
Cr-Branched-From: 41bc7435693fbce8ef86753cd9239e30550a3e2d-refs/heads/10.6.194@{#1} | ||
Cr-Branched-From: d5f29b929ce7746409201d77f44048f3e9529b40-refs/heads/main@{#82548} | ||
|
||
diff --git a/src/compiler/access-info.cc b/src/compiler/access-info.cc | ||
index 307bf44cf42381ec820221806fbbc5705d71de3c..237734929f3e71e05312981506bb0735631b9451 100644 | ||
--- a/src/compiler/access-info.cc | ||
+++ b/src/compiler/access-info.cc | ||
@@ -454,9 +454,15 @@ PropertyAccessInfo AccessInfoFactory::ComputeDataFieldAccessInfo( | ||
map, descriptor, details_representation)); | ||
} else if (details_representation.IsHeapObject()) { | ||
if (descriptors_field_type->IsNone()) { | ||
- // Store is not safe if the field type was cleared. | ||
- if (access_mode == AccessMode::kStore) { | ||
- return Invalid(); | ||
+ switch (access_mode) { | ||
+ case AccessMode::kStore: | ||
+ case AccessMode::kStoreInLiteral: | ||
+ case AccessMode::kDefine: | ||
+ // Store is not safe if the field type was cleared. | ||
+ return Invalid(); | ||
+ case AccessMode::kLoad: | ||
+ case AccessMode::kHas: | ||
+ break; | ||
} | ||
|
||
// The field type was cleared by the GC, so we don't know anything |