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

Unified Diff: src/ast.cc

Issue 8373029: [hydrogen] optimize switch with string clauses (Closed) Base URL: gh:v8/v8@master
Patch Set: mips: CompareGenericAndBranch Created 9 years, 2 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/ast.cc
diff --git a/src/ast.cc b/src/ast.cc
index 9e34bc0e815ab3836f07f95ae51dbc27e2c85ae8..3b32475a3716a01770f2374a239e413b26868cab 100644
--- a/src/ast.cc
+++ b/src/ast.cc
@@ -692,6 +692,8 @@ void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
TypeInfo info = oracle->SwitchType(this);
if (info.IsSmi()) {
compare_type_ = SMI_ONLY;
+ } else if (info.IsSymbol()) {
+ compare_type_ = SYMBOL_ONLY;
} else if (info.IsNonPrimitive()) {
compare_type_ = OBJECT_ONLY;
} else {

Powered by Google App Engine
This is Rietveld 408576698