ec85051385
We now have %FinalizeOptimization() to block until all concurrent compile jobs are done. Bug: v8:7790,v8:12004 Change-Id: Ibb9955be06957b3f395b680e9be570c7c3ec0dcb Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3086478 Auto-Submit: Jakob Gruber <jgruber@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Reviewed-by: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#76231}
21 lines
494 B
JavaScript
21 lines
494 B
JavaScript
// Copyright 2019 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: --opt --interrupt-budget=100 --budget-for-feedback-vector-allocation=10 --allow-natives-syntax
|
|
|
|
function f() {
|
|
let s = 0;
|
|
for (let i = 0; i < 10; i++) {
|
|
s += i;
|
|
}
|
|
return s;
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(f, "allow heuristic optimization");
|
|
f();
|
|
f();
|
|
f();
|
|
%FinalizeOptimization();
|
|
assertOptimized(f);
|