Remove switch-clause limit
authorverwaest@chromium.org <verwaest@chromium.org>
Mon, 22 Sep 2014 12:44:23 +0000 (12:44 +0000)
committerverwaest@chromium.org <verwaest@chromium.org>
Mon, 22 Sep 2014 12:44:23 +0000 (12:44 +0000)
BUG=
R=danno@chromium.org

Review URL: https://codereview.chromium.org/582653002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24118 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/hydrogen.cc
src/objects.h

index 848178c..dfadbe5 100644 (file)
@@ -4834,14 +4834,9 @@ void HOptimizedGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) {
   DCHECK(current_block() != NULL);
   DCHECK(current_block()->HasPredecessor());
 
-  // We only optimize switch statements with a bounded number of clauses.
-  const int kCaseClauseLimit = 128;
   ZoneList<CaseClause*>* clauses = stmt->cases();
   int clause_count = clauses->length();
   ZoneList<HBasicBlock*> body_blocks(clause_count, zone());
-  if (clause_count > kCaseClauseLimit) {
-    return Bailout(kSwitchStatementTooManyClauses);
-  }
 
   CHECK_ALIVE(VisitForValue(stmt->tag()));
   Add<HSimulate>(stmt->EntryId());
index d88240d..37227f9 100644 (file)
@@ -1200,9 +1200,6 @@ template <class C> inline bool Is(Object* obj);
   V(kSmiSubtractionOverflow, "Smi subtraction overflow")                       \
   V(kStackAccessBelowStackPointer, "Stack access below stack pointer")         \
   V(kStackFrameTypesMustMatch, "Stack frame types must match")                 \
-  V(kSwitchStatementMixedOrNonLiteralSwitchLabels,                             \
-    "SwitchStatement: mixed or non-literal switch labels")                     \
-  V(kSwitchStatementTooManyClauses, "SwitchStatement: too many clauses")       \
   V(kTheCurrentStackPointerIsBelowCsp,                                         \
     "The current stack pointer is below csp")                                  \
   V(kTheInstructionShouldBeALui, "The instruction should be a lui")            \