d734bb4c5d
Gracefully handle hugely nested JSBoundFunctions. Bug: chromium:1125145 Change-Id: I08f136fa9d35cf16ea8da5132d4d483a75d0ba94 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2418091 Auto-Submit: Georg Neis <neis@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#70164}
20 lines
404 B
JavaScript
20 lines
404 B
JavaScript
// 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.
|
|
|
|
// Flags: --allow-natives-syntax --opt
|
|
|
|
function foo() {}
|
|
for (let i = 0; i < 100000; ++i) {
|
|
foo = foo.bind();
|
|
}
|
|
|
|
function main() {
|
|
foo();
|
|
}
|
|
|
|
%PrepareFunctionForOptimization(main);
|
|
main();
|
|
%OptimizeFunctionOnNextCall(main);
|
|
main();
|