Use HSoftDeoptimize instead of HDeoptimize in VisitSwitchStatement, and visit the...
authorjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 5 Jun 2013 11:05:45 +0000 (11:05 +0000)
committerjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 5 Jun 2013 11:05:45 +0000 (11:05 +0000)
R=svenpanne@chromium.org

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

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

src/hydrogen.cc

index 85a7534..5da6d52 100644 (file)
@@ -5023,11 +5023,7 @@ void HOptimizedGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) {
 
     if (stmt->switch_type() == SwitchStatement::SMI_SWITCH) {
       if (!clause->IsSmiCompare()) {
-        // Finish with deoptimize and add uses of enviroment values to
-        // account for invisible uses.
-        current_block()->FinishExitWithDeoptimization(HDeoptimize::kUseAll);
-        set_current_block(NULL);
-        break;
+        AddSoftDeoptimize();
       }
 
       HCompareIDAndBranch* compare_ =
@@ -5051,7 +5047,7 @@ void HOptimizedGraphBuilder::VisitSwitchStatement(SwitchStatement* stmt) {
   }
 
   // Save the current block to use for the default or to join with the
-  // exit.  This block is NULL if we deoptimized.
+  // exit.
   HBasicBlock* last_block = current_block();
 
   if (not_string_block != NULL) {