1e2aa7820b
The existing has property handling did not account for the fact an IC can have LOAD_IGNORE_OUT_OF_BOUNDS while some of the maps in the IC do not allow out of bounds loads. bug: chromium:942068 Change-Id: I935402d9d72e9c0228510ef69154ea130d1c71f0 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1525876 Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Benedikt Meurer <bmeurer@chromium.org> Cr-Commit-Position: refs/heads/master@{#60269}
18 lines
428 B
JavaScript
18 lines
428 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 foo(index, array) {
|
|
return index in array;
|
|
}
|
|
|
|
let arr = [];
|
|
arr.__proto__ = [0];
|
|
assertFalse(foo(0, {}));
|
|
assertTrue(foo(0, arr));
|
|
assertFalse(foo(0, {}));
|
|
%OptimizeFunctionOnNextCall(foo);
|
|
assertTrue(foo(0, arr));
|