Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(586)

Unified Diff: src/ia32/lithium-ia32.cc

Issue 17082003: Let NaN flow as double into HBranch (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/ia32/lithium-ia32.cc
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
index 885b2e304e3a57b8cb473a02ed61a069379ac017..e5324fc606a353c93c24e475c788403368b163bd 100644
--- a/src/ia32/lithium-ia32.cc
+++ b/src/ia32/lithium-ia32.cc
@@ -1060,6 +1060,8 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
return new(zone()) LGoto(successor->block_id());
}
+ ToBooleanStub::Types expected = instr->expected_input_types();
+
// Untagged integers or doubles, smis and booleans don't require a
// deoptimization environment nor a temp register.
Representation rep = value->representation();
@@ -1068,12 +1070,17 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
return new(zone()) LBranch(UseRegister(value), NULL);
}
- ToBooleanStub::Types expected = instr->expected_input_types();
+ bool needs_temp = expected.NeedsMap() || expected.IsEmpty();
+ LOperand* temp = needs_temp ? TempRegister() : NULL;
+
+ // The Generic stub does not have a deopt, so we need no environment.
+ if (expected.IsGeneric()) {
+ return new(zone()) LBranch(UseRegister(value), temp);
+ }
+
// We need a temporary register when we have to access the map *or* we have
// no type info yet, in which case we handle all cases (including the ones
// involving maps).
- bool needs_temp = expected.NeedsMap() || expected.IsEmpty();
- LOperand* temp = needs_temp ? TempRegister() : NULL;
return AssignEnvironment(new(zone()) LBranch(UseRegister(value), temp));
}

Powered by Google App Engine
This is Rietveld 408576698