d97bc8db79
Bug: v8:9087 Change-Id: Ibc21d7e5619e4e6a0edc98cb0bd12e67ab2f6643 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554690 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Georg Neis <neis@chromium.org> Cr-Commit-Position: refs/heads/master@{#60657}
22 lines
502 B
JavaScript
22 lines
502 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 constructor() {}
|
|
const obj = Object.create(constructor.prototype);
|
|
|
|
for (let i = 0; i < 1020; ++i) {
|
|
constructor.prototype["x" + i] = 42;
|
|
}
|
|
|
|
function foo() {
|
|
return obj instanceof constructor;
|
|
}
|
|
|
|
assertTrue(foo());
|
|
assertTrue(foo());
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
assertTrue(foo());
|