Index: src/compiler/control-builders.cc |
diff --git a/src/compiler/control-builders.cc b/src/compiler/control-builders.cc |
index 2ace441e61eac82a83439ed2155a599128a290fb..0e4f1683b86668d5d623f88a56f192cad4bd6ada 100644 |
--- a/src/compiler/control-builders.cc |
+++ b/src/compiler/control-builders.cc |
@@ -179,21 +179,25 @@ void TryCatchBuilder::EndCatch() { |
void TryFinallyBuilder::BeginTry() { |
finally_environment_ = environment()->CopyAsUnreachable(); |
finally_environment_->Push(the_hole()); |
+ finally_environment_->Push(the_hole()); |
} |
-void TryFinallyBuilder::LeaveTry(Node* token) { |
+void TryFinallyBuilder::LeaveTry(Node* token, Node* value) { |
+ environment()->Push(value); |
environment()->Push(token); |
finally_environment_->Merge(environment()); |
- environment()->Pop(); |
+ environment()->Drop(2); |
} |
-void TryFinallyBuilder::EndTry(Node* fallthrough_token) { |
+void TryFinallyBuilder::EndTry(Node* fallthrough_token, Node* value) { |
+ environment()->Push(value); |
environment()->Push(fallthrough_token); |
finally_environment_->Merge(environment()); |
- environment()->Pop(); |
+ environment()->Drop(2); |
token_node_ = finally_environment_->Pop(); |
+ value_node_ = finally_environment_->Pop(); |
set_environment(finally_environment_); |
} |