Reviewers: Sven Panne,

Message:
PTAL.

Description:
Use HSoftDeoptimize instead of HDeoptimize in VisitSwitchStatement, and visit
the entire graph

Please review this at https://codereview.chromium.org/15929010/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M src/hydrogen.cc


Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 2093db47062aaf7e443780289c09acdb0e296fc0..67c0d9fd4619dd6d9c0b375a7c8272aa63f568fb 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -4996,11 +4996,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_ =
@@ -5024,7 +5020,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) {


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to