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

Unified Diff: src/compiler/control-builders.cc

Issue 970253002: [turbofan] Fix exception being re-thrown after finally-block. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Sneak in alpha sorting. Created 5 years, 10 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/compiler/control-builders.h ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_);
}
« no previous file with comments | « src/compiler/control-builders.h ('k') | src/compiler/linkage.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698