Robustification: Always assign an environment to LModI when a deopt is possible.

Currently things only work because of a very fragile interaction between minus
zero propagation and range analysis.

R=mvstanton@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14617 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d24d9616
......@@ -1459,7 +1459,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
}
if (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
instr->CheckFlag(HValue::kCanBeDivByZero)) {
instr->CheckFlag(HValue::kCanBeDivByZero) ||
instr->CheckFlag(HValue::kCanOverflow)) {
return AssignEnvironment(DefineAsRegister(mod));
} else {
return DefineAsRegister(mod);
......
......@@ -1538,7 +1538,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
}
return (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
instr->CheckFlag(HValue::kCanBeDivByZero))
instr->CheckFlag(HValue::kCanBeDivByZero) ||
instr->CheckFlag(HValue::kCanOverflow))
? AssignEnvironment(result)
: result;
} else if (instr->representation().IsTagged()) {
......
......@@ -1377,7 +1377,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
}
if (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
instr->CheckFlag(HValue::kCanBeDivByZero)) {
instr->CheckFlag(HValue::kCanBeDivByZero) ||
instr->CheckFlag(HValue::kCanOverflow)) {
return AssignEnvironment(DefineAsRegister(mod));
} else {
return DefineAsRegister(mod);
......
......@@ -1451,7 +1451,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
}
return (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
instr->CheckFlag(HValue::kCanBeDivByZero))
instr->CheckFlag(HValue::kCanBeDivByZero) ||
instr->CheckFlag(HValue::kCanOverflow))
? AssignEnvironment(result)
: result;
} else if (instr->representation().IsTagged()) {
......
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