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
This commit is contained in:
jkummerow@chromium.org 2013-06-05 11:05:45 +00:00
parent 56f3337ebc
commit 4a70dcf530

View 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) {