v8/test/mjsunit/compiler/regress-1217562.js
Georg Neis 376eb8020d [compiler] Add missing prototype serialization of bound function map
This is needed for JSCallReducer.

Bug: chromium:1217562
Change-Id: I1f06040a74c393598c134301ba0cf04a46380107
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2945184
Reviewed-by: Jakob Gruber <jgruber@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75019}
2021-06-08 14:09:56 +00:00

20 lines
378 B
JavaScript

// 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
function foo() {
foo.bind();
foo.__proto__ = class {};
}
%PrepareFunctionForOptimization(foo);
foo();
foo();
foo();
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();