Bug 1115665: Don't do beta optimizations for Compare_Value compares, r=jandem

This commit is contained in:
Hannes Verschore 2014-12-29 21:48:42 +01:00
parent 4face24a5f
commit 3518565414
2 changed files with 12 additions and 1 deletions

View File

@ -0,0 +1,8 @@
Object.prototype[3] = 3
x = Array()
function f() {
for (i = 0; i < 9; i++) {
if (Object[x++] != 0) {}
}
}
f()

View File

@ -155,8 +155,11 @@ RangeAnalysis::addBetaNodes()
MCompare *compare = test->getOperand(0)->toCompare();
if (compare->compareType() == MCompare::Compare_Unknown)
if (compare->compareType() == MCompare::Compare_Unknown ||
compare->compareType() == MCompare::Compare_Value)
{
continue;
}
// TODO: support unsigned comparisons
if (compare->compareType() == MCompare::Compare_UInt32)