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

Side by Side Diff: pkg/compiler/lib/src/resolution/label_scope.dart

Issue 2930293002: Parameterize and move JumpTarget/LabelDefition to elements/jumps.dart (Closed)
Patch Set: Fix Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library dart2js.resolution.label_scope; 5 library dart2js.resolution.label_scope;
6 6
7 import '../elements/elements.dart' show JumpTarget, LabelDefinition; 7 import '../elements/jumps.dart';
8 import '../util/util.dart' show Link; 8 import '../util/util.dart' show Link;
9 9
10 abstract class LabelScope { 10 abstract class LabelScope {
11 LabelScope get outer; 11 LabelScope get outer;
12 LabelDefinition lookup(String label); 12 LabelDefinition lookup(String label);
13 } 13 }
14 14
15 class LabeledStatementLabelScope implements LabelScope { 15 class LabeledStatementLabelScope implements LabelScope {
16 final LabelScope outer; 16 final LabelScope outer;
17 final Map<String, LabelDefinition> labels; 17 final Map<String, LabelDefinition> labels;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 labels = new SwitchLabelScope(labels, continueElements); 95 labels = new SwitchLabelScope(labels, continueElements);
96 nestingLevel++; 96 nestingLevel++;
97 } 97 }
98 98
99 void exitSwitch() { 99 void exitSwitch() {
100 nestingLevel--; 100 nestingLevel--;
101 breakTargetStack = breakTargetStack.tail; 101 breakTargetStack = breakTargetStack.tail;
102 labels = labels.outer; 102 labels = labels.outer;
103 } 103 }
104 } 104 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/kernel/kernel_visitor.dart ('k') | pkg/compiler/lib/src/resolution/members.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698