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

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

Issue 1213183003: [turbofan] Fix exit control flow in TryCatchBuilder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-505354.js » ('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 6bc364965c0c6a55d7bed600855f9bdad07b2596..35798283558ed20b25cfba1adc49d5bbd8a9f0c4 100644
--- a/src/compiler/control-builders.cc
+++ b/src/compiler/control-builders.cc
@@ -160,6 +160,7 @@ void BlockBuilder::EndBlock() {
void TryCatchBuilder::BeginTry() {
+ exit_environment_ = environment()->CopyAsUnreachable();
catch_environment_ = environment()->CopyAsUnreachable();
catch_environment_->Push(the_hole());
}
@@ -174,7 +175,7 @@ void TryCatchBuilder::Throw(Node* exception) {
void TryCatchBuilder::EndTry() {
- exit_environment_ = environment();
+ exit_environment_->Merge(environment());
exception_node_ = catch_environment_->Pop();
set_environment(catch_environment_);
}
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-crbug-505354.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698