-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refs: v8/v8@9.0.257.13...9.0.257.16 PR-URL: #38218 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Beth Griggs <[email protected]>
- Loading branch information
Showing
6 changed files
with
47 additions
and
17 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
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
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,25 @@ | ||
// Copyright 2021 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 --no-lazy-feedback-allocation | ||
// Flags: --interrupt-budget=100 | ||
|
||
function f() { | ||
return "".indexOf("", 2); | ||
} | ||
|
||
%PrepareFunctionForOptimization(f) | ||
assertEquals(f(), 0); | ||
assertEquals(f(), 0); | ||
%OptimizeFunctionOnNextCall(f) | ||
assertEquals(f(), 0); | ||
assertEquals(f(), 0); | ||
|
||
function g() { | ||
return "".indexOf("", 2); | ||
} | ||
for (let i = 0; i < 191; i++) { | ||
// Expect a natural optimization here due to low interrupt budget. | ||
assertEquals(g(), 0); | ||
} |