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) { ...@@ -1459,7 +1459,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
} }
if (instr->CheckFlag(HValue::kBailoutOnMinusZero) || if (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
instr->CheckFlag(HValue::kCanBeDivByZero)) { instr->CheckFlag(HValue::kCanBeDivByZero) ||
instr->CheckFlag(HValue::kCanOverflow)) {
return AssignEnvironment(DefineAsRegister(mod)); return AssignEnvironment(DefineAsRegister(mod));
} else { } else {
return DefineAsRegister(mod); return DefineAsRegister(mod);
......
...@@ -1538,7 +1538,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) { ...@@ -1538,7 +1538,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
} }
return (instr->CheckFlag(HValue::kBailoutOnMinusZero) || return (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
instr->CheckFlag(HValue::kCanBeDivByZero)) instr->CheckFlag(HValue::kCanBeDivByZero) ||
instr->CheckFlag(HValue::kCanOverflow))
? AssignEnvironment(result) ? AssignEnvironment(result)
: result; : result;
} else if (instr->representation().IsTagged()) { } else if (instr->representation().IsTagged()) {
......
...@@ -1377,7 +1377,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) { ...@@ -1377,7 +1377,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
} }
if (instr->CheckFlag(HValue::kBailoutOnMinusZero) || if (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
instr->CheckFlag(HValue::kCanBeDivByZero)) { instr->CheckFlag(HValue::kCanBeDivByZero) ||
instr->CheckFlag(HValue::kCanOverflow)) {
return AssignEnvironment(DefineAsRegister(mod)); return AssignEnvironment(DefineAsRegister(mod));
} else { } else {
return DefineAsRegister(mod); return DefineAsRegister(mod);
......
...@@ -1451,7 +1451,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) { ...@@ -1451,7 +1451,8 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
} }
return (instr->CheckFlag(HValue::kBailoutOnMinusZero) || return (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
instr->CheckFlag(HValue::kCanBeDivByZero)) instr->CheckFlag(HValue::kCanBeDivByZero) ||
instr->CheckFlag(HValue::kCanOverflow))
? AssignEnvironment(result) ? AssignEnvironment(result)
: result; : result;
} else if (instr->representation().IsTagged()) { } 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