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

Unified Diff: src/crankshaft/x87/lithium-x87.cc

Issue 2498563002: [cleanup] Replace ToBooleanICStub::Types with ToBooleanHints (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | src/type-hints.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x87/lithium-x87.cc
diff --git a/src/crankshaft/x87/lithium-x87.cc b/src/crankshaft/x87/lithium-x87.cc
index 642f68b1833b17cde7e1f39ae075074037a1385e..c030639f77af3b31787ef554fc11142fa9d1ba78 100644
--- a/src/crankshaft/x87/lithium-x87.cc
+++ b/src/crankshaft/x87/lithium-x87.cc
@@ -915,18 +915,20 @@ LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
HValue* value = instr->value();
Representation r = value->representation();
HType type = value->type();
- ToBooleanICStub::Types expected = instr->expected_input_types();
- if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic();
+ ToBooleanHints expected = instr->expected_input_types();
+ if (expected == ToBooleanHint::kNone) expected = ToBooleanHint::kAny;
bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() ||
type.IsJSArray() || type.IsHeapNumber() || type.IsString();
- LOperand* temp = !easy_case && expected.NeedsMap() ? TempRegister() : NULL;
+ LOperand* temp = !easy_case && (expected & ToBooleanHint::kNeedsMap)
+ ? TempRegister()
+ : NULL;
LInstruction* branch =
temp != NULL ? new (zone()) LBranch(UseRegister(value), temp)
: new (zone()) LBranch(UseRegisterAtStart(value), temp);
- if (!easy_case &&
- ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) ||
- !expected.IsGeneric())) {
+ if (!easy_case && ((!(expected & ToBooleanHint::kSmallInteger) &&
+ (expected & ToBooleanHint::kNeedsMap)) ||
+ expected != ToBooleanHint::kAny)) {
branch = AssignEnvironment(branch);
}
return branch;
« no previous file with comments | « src/crankshaft/x87/lithium-codegen-x87.cc ('k') | src/type-hints.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698