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

Unified Diff: runtime/vm/scopes.h

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/parser.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/scopes.h
diff --git a/runtime/vm/scopes.h b/runtime/vm/scopes.h
index aaf120d4193814f2f466693ddda32b7dc38a2878..c2fbfe07f720d6ba3d7b6d80a032ca46bf01f5e0 100644
--- a/runtime/vm/scopes.h
+++ b/runtime/vm/scopes.h
@@ -182,7 +182,6 @@ class SourceLabel : public ZoneAllocated {
const String& name() const { return name_; }
LocalScope* owner() const { return owner_; }
void set_owner(LocalScope* owner) {
- ASSERT(owner_ == NULL);
owner_ = owner;
}
@@ -191,6 +190,7 @@ class SourceLabel : public ZoneAllocated {
// Returns the function level of the scope in which the label is defined.
int FunctionLevel() const;
+ bool IsUnresolved() { return kind_ == kForward; }
void ResolveForwardReference() { kind_ = kCase; }
private:
@@ -255,6 +255,9 @@ class LocalScope : public ZoneAllocated {
// is already present.
bool AddLabel(SourceLabel* label);
+ // Move an unresolved label of a switch case label to an outer switch.
+ void MoveLabel(SourceLabel* label);
+
// Lookup a variable in this scope only.
LocalVariable* LocalLookupVariable(const String& name) const;
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698