summaryrefslogtreecommitdiff
path: root/deps/v8/test/mjsunit/compiler/regress-758983.js
blob: 93627e3dfdc612db2deb54152d18908367529c24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright 2017 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

var holey = [ 2.2,,"x" ];

function f(b) {
  holey[0] = 1.1;
  var r = holey[0];
  r = b ? r : 0;
  return r < 0;
}

%PrepareFunctionForOptimization(f);
f(true);
f(true);
%OptimizeFunctionOnNextCall(f);
assertFalse(f(true));