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
parent 32735ae3
......@@ -179,12 +179,9 @@ template<int R>
bool LTemplateResultInstruction<R>::MustSignExtendResult(
LPlatformChunk* chunk) const {
HValue* hvalue = this->hydrogen_value();
if (hvalue == NULL) return false;
if (!hvalue->representation().IsInteger32()) return false;
if (hvalue->HasRange() && !hvalue->range()->CanBeNegative()) return false;
return chunk->GetDehoistedKeyIds()->Contains(hvalue->id());
return hvalue != NULL &&
hvalue->representation().IsInteger32() &&
chunk->GetDehoistedKeyIds()->Contains(hvalue->id());
}
......
// 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();
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment