Skip to content

Commit 380621f

Browse files
victorgomesV8 LUCI CQ
authored andcommitted
[context] Call correct load for lex var in LoadGlobalIC
Fixed: 401652934 Change-Id: Id6cf4212dad9974225da1d0549a213ce3e4492af Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6330273 Reviewed-by: Igor Sheludko <[email protected]> Commit-Queue: Igor Sheludko <[email protected]> Auto-Submit: Victor Gomes <[email protected]> Cr-Commit-Position: refs/heads/main@{#99151}
1 parent 8e2ac01 commit 380621f

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

src/ic/accessor-assembler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3500,7 +3500,7 @@ void AccessorAssembler::LoadGlobalIC_TryPropertyCellCase(
35003500
Signed(DecodeWord<FeedbackNexus::SlotIndexBits>(lexical_handler));
35013501
TNode<Context> context = lazy_context();
35023502
TNode<Context> script_context = LoadScriptContext(context, context_index);
3503-
TNode<Object> result = LoadContextElement(script_context, slot_index);
3503+
TNode<Object> result = LoadScriptContextElement(script_context, slot_index);
35043504
exit_point->Return(result);
35053505
}
35063506
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// Copyright 2025 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
function checkTestVar() {
6+
assertEquals(0, testVar);
7+
}

test/mjsunit/regress-401652934.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// Copyright 2025 the V8 project authors. All rights reserved.
2+
// Use of this source code is governed by a BSD-style license that can be
3+
// found in the LICENSE file.
4+
5+
// Flags: --allow-natives-syntax --no-lazy-feedback-allocation
6+
7+
load("test/mjsunit/regress-401652934-2.js")
8+
9+
let testVar;
10+
testVar = 0 * Math.PI;
11+
12+
checkTestVar();
13+
checkTestVar();

0 commit comments

Comments
 (0)