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

Unified Diff: src/crankshaft/ppc/lithium-ppc.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/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/ppc/lithium-ppc.cc
diff --git a/src/crankshaft/ppc/lithium-ppc.cc b/src/crankshaft/ppc/lithium-ppc.cc
index ca19cf86d04e889dab186d9f354041c8147f5c0b..5ba44fa2e6253e9e0cd97f49bfd125602521ea99 100644
--- a/src/crankshaft/ppc/lithium-ppc.cc
+++ b/src/crankshaft/ppc/lithium-ppc.cc
@@ -882,15 +882,15 @@ 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();
LInstruction* branch = new (zone()) LBranch(UseRegister(value));
- 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/ppc/lithium-codegen-ppc.cc ('k') | src/crankshaft/s390/lithium-codegen-s390.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698