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

Unified Diff: runtime/vm/scopes.cc

Issue 2030763002: Fix finally clause inlining for forward jumps (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 | « runtime/vm/scopes.h ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes.cc
diff --git a/runtime/vm/scopes.cc b/runtime/vm/scopes.cc
index 6060e7a075a2df3d5fd149fb97980839685fb1d3..be2cdda24e44df3e4f8ead4de381fc92dfc5df4d 100644
--- a/runtime/vm/scopes.cc
+++ b/runtime/vm/scopes.cc
@@ -98,6 +98,14 @@ bool LocalScope::AddLabel(SourceLabel* label) {
}
+void LocalScope::MoveLabel(SourceLabel* label) {
+ ASSERT(LocalLookupLabel(label->name()) == NULL);
+ ASSERT(label->kind() == SourceLabel::kForward);
+ labels_.Add(label);
+ label->set_owner(this);
+}
+
+
NameReference* LocalScope::FindReference(const String& name) const {
ASSERT(name.IsSymbol());
intptr_t num_references = referenced_.length();
@@ -489,7 +497,7 @@ SourceLabel* LocalScope::CheckUnresolvedLabels() {
if (outer_switch == NULL) {
return label;
} else {
- outer_switch->AddLabel(label);
+ outer_switch->MoveLabel(label);
}
}
}
« no previous file with comments | « runtime/vm/scopes.h ('k') | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698