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

Unified Diff: src/compiler/type-hint-analyzer.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/code-stubs-hydrogen.cc ('k') | src/crankshaft/arm/lithium-arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/type-hint-analyzer.cc
diff --git a/src/compiler/type-hint-analyzer.cc b/src/compiler/type-hint-analyzer.cc
index a668a48ad8fcf44c800fa3dbb7f0a958e04a03a3..da77a0c9978efe570bff84644a5e91e59a32abf6 100644
--- a/src/compiler/type-hint-analyzer.cc
+++ b/src/compiler/type-hint-analyzer.cc
@@ -92,21 +92,7 @@ bool TypeHintAnalysis::GetToBooleanHints(TypeFeedbackId id,
Handle<Code> code = i->second;
DCHECK_EQ(Code::TO_BOOLEAN_IC, code->kind());
ToBooleanICStub stub(code->GetIsolate(), code->extra_ic_state());
-// TODO(bmeurer): Replace ToBooleanICStub::Types with ToBooleanHints.
-#define ASSERT_COMPATIBLE(NAME, Name) \
- STATIC_ASSERT(1 << ToBooleanICStub::NAME == \
- static_cast<int>(ToBooleanHint::k##Name))
- ASSERT_COMPATIBLE(UNDEFINED, Undefined);
- ASSERT_COMPATIBLE(BOOLEAN, Boolean);
- ASSERT_COMPATIBLE(NULL_TYPE, Null);
- ASSERT_COMPATIBLE(SMI, SmallInteger);
- ASSERT_COMPATIBLE(SPEC_OBJECT, Receiver);
- ASSERT_COMPATIBLE(STRING, String);
- ASSERT_COMPATIBLE(SYMBOL, Symbol);
- ASSERT_COMPATIBLE(HEAP_NUMBER, HeapNumber);
- ASSERT_COMPATIBLE(SIMD_VALUE, SimdValue);
-#undef ASSERT_COMPATIBLE
- *hints = ToBooleanHints(stub.types().ToIntegral());
+ *hints = stub.hints();
return true;
}
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/crankshaft/arm/lithium-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698