v8/test/mjsunit/regress/regress-361608.js
svenpanne@chromium.org 5bddec047d Do not use ranges after range analysis.
Due to the SSA vs. SSI difference, we are only allowed to use the
flags computed during range analysis, not the ranges themselves. For
the case at hand, there is no such flag, so the condition is simply
remvoed.

BUG=361608
LOG=y
R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/232553004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@20645 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2014-04-10 09:40:17 +00:00

21 lines
407 B
JavaScript

// Copyright 2014 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 f() {};
int_array = [1];
function foo() {
var x;
for (var i = -1; i < 0; i++) {
x = int_array[i + 1];
f(function() { x = i; });
}
}
foo();
%OptimizeFunctionOnNextCall(foo);
foo();