2020-10-20 11:44:01 +00:00
|
|
|
// Copyright 2020 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.
|
|
|
|
|
2022-04-28 14:22:23 +00:00
|
|
|
// Flags: --allow-natives-syntax --turbofan --stack-limit=100
|
2020-10-20 11:44:01 +00:00
|
|
|
|
|
|
|
function foo() {}
|
2021-07-30 14:23:06 +00:00
|
|
|
for (let i = 0; i < 10000; ++i) {
|
2020-10-20 11:44:01 +00:00
|
|
|
foo = foo.bind();
|
|
|
|
}
|
|
|
|
|
|
|
|
function main() {
|
|
|
|
foo();
|
2020-10-26 09:19:12 +00:00
|
|
|
foo();
|
2020-10-20 11:44:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
%PrepareFunctionForOptimization(main);
|
|
|
|
main();
|
|
|
|
%OptimizeFunctionOnNextCall(main);
|
|
|
|
main();
|