25 lines
552 B
JavaScript
25 lines
552 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: --allow-natives-syntax
|
||
|
|
||
|
function write(begin, end, step) {
|
||
|
for (var i = begin; i >= end; i += step) {
|
||
|
step = end - begin;
|
||
|
begin >>>= 805306382;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
function bar() {
|
||
|
for (let i = 0; i < 10000; i++) {
|
||
|
write(Infinity, 1, 1);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
%PrepareFunctionForOptimization(write);
|
||
|
%PrepareFunctionForOptimization(bar);
|
||
|
bar();
|
||
|
%OptimizeFunctionOnNextCall(bar);
|
||
|
bar();
|