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

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
parent 56f3337e
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment