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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 63983005: Simplify the desugaring of catch clauses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporated final review comments. Created 7 years, 1 month 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 | « runtime/vm/ast.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
diff --git a/runtime/vm/flow_graph_builder.cc b/runtime/vm/flow_graph_builder.cc
index a5349f3f6ee9a6f84b926299f1c9b1bd9a26ac00..37426ec14210d768b57a0501a2bc25481076ed3f 100644
--- a/runtime/vm/flow_graph_builder.cc
+++ b/runtime/vm/flow_graph_builder.cc
@@ -3599,11 +3599,12 @@ void EffectGraphVisitor::VisitTryCatchNode(TryCatchNode* node) {
catch_block->stacktrace_var(),
catch_block->needs_stacktrace());
owner()->AddCatchEntry(catch_entry);
- ASSERT(!for_catch.is_open());
AppendFragment(catch_entry, for_catch);
- JoinEntryInstr* join = node->end_catch_label()->join_for_continue();
- if (join != NULL) {
+ if (for_catch.is_open()) {
+ JoinEntryInstr* join = new JoinEntryInstr(owner()->AllocateBlockId(),
+ original_handler_index);
+ for_catch.Goto(join);
if (is_open()) Goto(join);
exit_ = join;
}
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698