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

Unified Diff: lib/compiler/implementation/ssa/builder.dart

Issue 10392024: Add a "Label" Node around an Identifier that is being used as a label. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Only use Label nodes for label introductions. Include the colon. Created 8 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
Index: lib/compiler/implementation/ssa/builder.dart
diff --git a/lib/compiler/implementation/ssa/builder.dart b/lib/compiler/implementation/ssa/builder.dart
index e8d852fa6b589eb91fbc1d910f5e07bf80079673..cec566830ee2eb7183b6f1b71db47faa4ad26bd6 100644
--- a/lib/compiler/implementation/ssa/builder.dart
+++ b/lib/compiler/implementation/ssa/builder.dart
@@ -2815,6 +2815,13 @@ class SsaBuilder implements Visitor {
handleLoop(node, buildInitializer, buildCondition, () {}, buildBody);
}
+ visitLabel(Label node) {
+ // We visit labels in different roles depending on whether it's a
+ // label introduction or a label reference, so it's handled by the
+ // containing statement.
+ unreachable();
ahe 2012/05/10 11:52:30 I really don't like using this method. You have a
Lasse Reichstein Nielsen 2012/05/10 12:14:20 True, also the comment is no longer valid. Using i
+ }
+
visitLabeledStatement(LabeledStatement node) {
Statement body = node.getBody();
if (body is Loop || body is SwitchStatement) {

Powered by Google App Engine
This is Rietveld 408576698