v8/test/mjsunit/regress/regress-crbug-937734.js
Matt Gardner 1297c928d5 [turbofan] Use load_mode feedback for HasProperty access
ReduceJSHasProperty was always passing STANDARD_LOAD instead of using the load mode from
the feedback verctor. This was causing deopt loops when checking for out-of-bounds
indices.

chromium: 937734
Change-Id: I6de29f2c6a80bcc171cf027d47a2d1af1414b76c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1501975
Reviewed-by: Benedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Matt Gardner <magardn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#60073}
2019-03-06 19:27:31 +00:00

17 lines
336 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()
{
return 1 in [0];
}
foo();
foo();
%OptimizeFunctionOnNextCall(foo);
foo();
assertEquals(0, %GetDeoptCount(foo));