Skip to content

Commit 17da9e7

Browse files
tebbiV8 LUCI CQ
authored andcommitted
[compiler] fix FrameState revisit bug in escape analysis
Bug: chromium:1340335, chromium:1315901 Change-Id: Ic348e8a66df098f64cf1893f83c145ac7bdb1ecb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3732939 Reviewed-by: Maya Lekova <[email protected]> Commit-Queue: Tobias Tebbi <[email protected]> Auto-Submit: Tobias Tebbi <[email protected]> Cr-Commit-Position: refs/heads/main@{#81434}
1 parent e819e24 commit 17da9e7

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/compiler/escape-analysis.cc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ class ReduceScope {
7878
explicit ReduceScope(Node* node, Reduction* reduction)
7979
: current_node_(node), reduction_(reduction) {}
8080

81+
void SetValueChanged() { reduction()->set_value_changed(); }
82+
8183
protected:
8284
Node* current_node() const { return current_node_; }
8385
Reduction* reduction() { return reduction_; }
@@ -833,7 +835,9 @@ void ReduceNode(const Operator* op, EscapeAnalysisTracker::Scope* current,
833835
break;
834836
}
835837
case IrOpcode::kStateValues:
836-
// These uses are always safe.
838+
// We visit StateValue nodes through their correpsonding FrameState node,
839+
// so we need to make sure we revisit the FrameState.
840+
current->SetValueChanged();
837841
break;
838842
case IrOpcode::kFrameState: {
839843
// We mark the receiver as escaping due to the non-standard `.getThis`

0 commit comments

Comments
 (0)