v8/test/mjsunit/regress/regress-crbug-708050-1.js
bmeurer 483812d46c [turbofan] Fix typing rule for CheckBounds.
As of crrev.com/2760213003, the CheckBounds operator passes a truncation
that identfies zero and minus zero. However that was not reflected in
the typing rule, and as such the type of CheckBounds(-0,length) was
always Type::None. That confused the typed alias analysis in the
LoadElimination and led to ignoring StoreElement nodes.

BUG=chromium:708050
R=jarin@chromium.org

Review-Url: https://codereview.chromium.org/2812013006
Cr-Commit-Position: refs/heads/master@{#44598}
2017-04-12 09:02:28 +00:00

18 lines
359 B
JavaScript

// 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 v = {}
function foo() {
v[0] = 5;
v[-0] = 27;
return v[0];
}
assertEquals(27, foo());
%OptimizeFunctionOnNextCall(foo);
assertEquals(27, foo());