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

Unified Diff: src/hydrogen.cc

Issue 15832005: Make sure IfBuilder::Return clears the current block. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index f8771d11b1bc36be311f1c02a6987d5d3269f084..2d1e844ecc37c565004575764d88af7554bb83a9 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -822,9 +822,10 @@ void HGraphBuilder::IfBuilder::Deopt() {
void HGraphBuilder::IfBuilder::Return(HValue* value) {
HBasicBlock* block = builder_->current_block();
- block->Finish(new(zone()) HReturn(value,
- builder_->environment()->LookupContext(),
- builder_->graph()->GetConstantMinus1()));
+ HValue* context = builder_->environment()->LookupContext();
+ HValue* parameter_count = builder_->graph()->GetConstantMinus1();
+ block->FinishExit(new(zone()) HReturn(value, context, parameter_count));
+ builder_->set_current_block(NULL);
if (did_else_) {
first_false_block_ = NULL;
} else {
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698