Ensure LModByPowerOf2I only gets environment when it deopts.
R=svenpanne@chromium.org TEST=mozilla (with new --always-opt) Review URL: https://codereview.chromium.org/423093009 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22803 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
84525e2b2f
commit
ab1cb70c8d
@ -1416,7 +1416,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) {
|
||||
int32_t divisor = instr->right()->GetInteger32Constant();
|
||||
LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I(
|
||||
dividend, divisor));
|
||||
if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
if (instr->CheckFlag(HValue::kLeftCanBeNegative) &&
|
||||
instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
result = AssignEnvironment(result);
|
||||
}
|
||||
return result;
|
||||
|
@ -1854,7 +1854,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) {
|
||||
int32_t divisor = instr->right()->GetInteger32Constant();
|
||||
LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I(
|
||||
dividend, divisor));
|
||||
if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
if (instr->CheckFlag(HValue::kLeftCanBeNegative) &&
|
||||
instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
result = AssignEnvironment(result);
|
||||
}
|
||||
return result;
|
||||
|
@ -1464,7 +1464,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) {
|
||||
int32_t divisor = instr->right()->GetInteger32Constant();
|
||||
LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I(
|
||||
dividend, divisor));
|
||||
if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
if (instr->CheckFlag(HValue::kLeftCanBeNegative) &&
|
||||
instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
result = AssignEnvironment(result);
|
||||
}
|
||||
return result;
|
||||
|
@ -116,12 +116,12 @@ void LCodeGenBase::CheckEnvironmentUsage() {
|
||||
|
||||
HInstruction* hinstr = HInstruction::cast(hval);
|
||||
if (!hinstr->CanDeoptimize() && instr->HasEnvironment()) {
|
||||
V8_Fatal(__FILE__, __LINE__, "CanDeoptimize is wrong for %s (%s)\n",
|
||||
V8_Fatal(__FILE__, __LINE__, "CanDeoptimize is wrong for %s (%s)",
|
||||
hinstr->Mnemonic(), instr->Mnemonic());
|
||||
}
|
||||
|
||||
if (instr->HasEnvironment() && !instr->environment()->has_been_used()) {
|
||||
V8_Fatal(__FILE__, __LINE__, "unused environment for %s (%s)\n",
|
||||
V8_Fatal(__FILE__, __LINE__, "unused environment for %s (%s)",
|
||||
hinstr->Mnemonic(), instr->Mnemonic());
|
||||
}
|
||||
}
|
||||
|
@ -1419,7 +1419,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) {
|
||||
int32_t divisor = instr->right()->GetInteger32Constant();
|
||||
LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I(
|
||||
dividend, divisor));
|
||||
if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
if (instr->CheckFlag(HValue::kLeftCanBeNegative) &&
|
||||
instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
result = AssignEnvironment(result);
|
||||
}
|
||||
return result;
|
||||
|
@ -1421,7 +1421,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) {
|
||||
int32_t divisor = instr->right()->GetInteger32Constant();
|
||||
LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I(
|
||||
dividend, divisor));
|
||||
if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
if (instr->CheckFlag(HValue::kLeftCanBeNegative) &&
|
||||
instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
result = AssignEnvironment(result);
|
||||
}
|
||||
return result;
|
||||
|
@ -1444,7 +1444,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) {
|
||||
int32_t divisor = instr->right()->GetInteger32Constant();
|
||||
LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I(
|
||||
dividend, divisor));
|
||||
if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
if (instr->CheckFlag(HValue::kLeftCanBeNegative) &&
|
||||
instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
result = AssignEnvironment(result);
|
||||
}
|
||||
return result;
|
||||
|
@ -1450,7 +1450,8 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) {
|
||||
int32_t divisor = instr->right()->GetInteger32Constant();
|
||||
LInstruction* result = DefineSameAsFirst(new(zone()) LModByPowerOf2I(
|
||||
dividend, divisor));
|
||||
if (instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
if (instr->CheckFlag(HValue::kLeftCanBeNegative) &&
|
||||
instr->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
||||
result = AssignEnvironment(result);
|
||||
}
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user