-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[maglev] Fix bogus SmiTagUint32AndJumpIfSuccess logic
We were not correcting tagging (and moving reg-to-reg) when materializing values in an exception trampoline for Uint32. Fixed chromium:1477938 Bug: v8:7700 Change-Id: I5ec0c725eda5b32c4037cffe484c5d27bfc3e78a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4840338 Reviewed-by: Leszek Swirski <leszeks@chromium.org> Auto-Submit: Victor Gomes <victorgomes@chromium.org> Commit-Queue: Victor Gomes <victorgomes@chromium.org> Cr-Commit-Position: refs/heads/main@{#89793}
- Loading branch information
1 parent
825afa5
commit 2007ca0
Showing
2 changed files
with
34 additions
and
5 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,30 @@ | ||
// Copyright 2023 the V8 project authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
// | ||
// Flags: --allow-natives-syntax --maglev --no-maglev-inlining | ||
|
||
function foo() { | ||
return undefined; | ||
} | ||
|
||
function opt(){ | ||
let a = 4096; | ||
let b = 13; | ||
for (let i = 0; i < 10; i++) { | ||
try { | ||
let f = foo() | ||
++b; | ||
let c = '' ** b; | ||
a = i >>> c; | ||
f(); | ||
} catch { | ||
} | ||
} | ||
return a; | ||
} | ||
|
||
%PrepareFunctionForOptimization(opt); | ||
assertEquals(9, opt()); | ||
%OptimizeMaglevOnNextCall(opt); | ||
assertEquals(9, opt()); |