Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: src/hydrogen.cc

Issue 16155003: Fix IfBuilder::Deopt to clear the current block. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-243868.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after
805 last_true_block_ = builder_->current_block(); 805 last_true_block_ = builder_->current_block();
806 ASSERT(first_true_block_ == NULL || !last_true_block_->IsFinished()); 806 ASSERT(first_true_block_ == NULL || !last_true_block_->IsFinished());
807 builder_->set_current_block(first_false_block_); 807 builder_->set_current_block(first_false_block_);
808 did_else_ = true; 808 did_else_ = true;
809 } 809 }
810 810
811 811
812 void HGraphBuilder::IfBuilder::Deopt() { 812 void HGraphBuilder::IfBuilder::Deopt() {
813 HBasicBlock* block = builder_->current_block(); 813 HBasicBlock* block = builder_->current_block();
814 block->FinishExitWithDeoptimization(HDeoptimize::kUseAll); 814 block->FinishExitWithDeoptimization(HDeoptimize::kUseAll);
815 builder_->set_current_block(NULL);
815 if (did_else_) { 816 if (did_else_) {
816 first_false_block_ = NULL; 817 first_false_block_ = NULL;
817 } else { 818 } else {
818 first_true_block_ = NULL; 819 first_true_block_ = NULL;
819 } 820 }
820 } 821 }
821 822
822 823
823 void HGraphBuilder::IfBuilder::Return(HValue* value) { 824 void HGraphBuilder::IfBuilder::Return(HValue* value) {
824 HBasicBlock* block = builder_->current_block(); 825 HBasicBlock* block = builder_->current_block();
(...skipping 6362 matching lines...) Expand 10 before | Expand all | Expand 10 after
7187 if (IsExternalArrayElementsKind(map->elements_kind())) { 7188 if (IsExternalArrayElementsKind(map->elements_kind())) {
7188 todo_external_array = true; 7189 todo_external_array = true;
7189 } 7190 }
7190 num_untransitionable_maps++; 7191 num_untransitionable_maps++;
7191 untransitionable_map = map; 7192 untransitionable_map = map;
7192 } 7193 }
7193 } 7194 }
7194 7195
7195 // If only one map is left after transitioning, handle this case 7196 // If only one map is left after transitioning, handle this case
7196 // monomorphically. 7197 // monomorphically.
7198 ASSERT(num_untransitionable_maps >= 1);
7197 if (num_untransitionable_maps == 1) { 7199 if (num_untransitionable_maps == 1) {
7198 HInstruction* instr = NULL; 7200 HInstruction* instr = NULL;
7199 if (untransitionable_map->has_slow_elements_kind()) { 7201 if (untransitionable_map->has_slow_elements_kind()) {
7200 instr = AddInstruction(is_store ? BuildStoreKeyedGeneric(object, key, val) 7202 instr = AddInstruction(is_store ? BuildStoreKeyedGeneric(object, key, val)
7201 : BuildLoadKeyedGeneric(object, key)); 7203 : BuildLoadKeyedGeneric(object, key));
7202 } else { 7204 } else {
7203 instr = BuildMonomorphicElementAccess( 7205 instr = BuildMonomorphicElementAccess(
7204 object, key, val, transition, untransitionable_map, is_store, 7206 object, key, val, transition, untransitionable_map, is_store,
7205 store_mode); 7207 store_mode);
7206 } 7208 }
(...skipping 4265 matching lines...) Expand 10 before | Expand all | Expand 10 after
11472 } 11474 }
11473 } 11475 }
11474 11476
11475 #ifdef DEBUG 11477 #ifdef DEBUG
11476 if (graph_ != NULL) graph_->Verify(false); // No full verify. 11478 if (graph_ != NULL) graph_->Verify(false); // No full verify.
11477 if (allocator_ != NULL) allocator_->Verify(); 11479 if (allocator_ != NULL) allocator_->Verify();
11478 #endif 11480 #endif
11479 } 11481 }
11480 11482
11481 } } // namespace v8::internal 11483 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-243868.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698