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

Unified Diff: runtime/vm/parser.cc

Issue 2004883004: Fix latent bug in finally-block inlining (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
index 7819cd780ac26f66bf7a1621d56cd8d5c8611bac..d2d875785554c3e854f85f9d2c3bba60e381c399 100644
--- a/runtime/vm/parser.cc
+++ b/runtime/vm/parser.cc
@@ -9269,8 +9269,10 @@ void Parser::AddNodeForFinallyInlining(AstNode* node) {
return;
}
ASSERT(node->IsReturnNode() || node->IsJumpNode());
+ const intptr_t func_level = current_block_->scope->function_level();
TryStack* iterator = try_stack_;
- while (iterator != NULL) {
+ while ((iterator != NULL) &&
+ (iterator->try_block()->scope->function_level() == func_level)) {
// For continue and break node check if the target label is in scope.
if (node->IsJumpNode()) {
SourceLabel* label = node->AsJumpNode()->label();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698