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

Unified Diff: lib/compiler/implementation/namer.dart

Issue 10825180: Add JavaScript AST. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated. Created 8 years, 4 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
Index: lib/compiler/implementation/namer.dart
diff --git a/lib/compiler/implementation/namer.dart b/lib/compiler/implementation/namer.dart
index 5f2a7c59a03d89e7f6b162356aa2626a42d6cbdc..658f1365731aac7541b5cc30f75dbd036f07f225 100644
--- a/lib/compiler/implementation/namer.dart
+++ b/lib/compiler/implementation/namer.dart
@@ -42,6 +42,24 @@ class Namer {
selector);
}
+ String breakLabelName(LabelElement label) {
+ return '\$${label.labelName}\$${label.target.nestingLevel}';
+ }
+
+ String implicitBreakLabelName(TargetElement target) {
+ return '\$${target.nestingLevel}';
+ }
+
+ // We sometimes handle continue targets differently from break targets,
+ // so we have special continue-only labels.
+ String continueLabelName(LabelElement label) {
+ return 'c\$${label.labelName}\$${label.target.nestingLevel}';
+ }
+
+ String implicitContinueLabelName(TargetElement target) {
+ return 'c\$${target.nestingLevel}';
+ }
+
/** Returns a non-unique name for the given closure element. */
String closureName(Element element) {
List<String> parts = <String>[];

Powered by Google App Engine
This is Rietveld 408576698