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; |