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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/elements/modelx.dart

Issue 14969004: Implement continue for switch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 elements.modelx; 5 library elements.modelx;
6 6
7 import 'dart:uri'; 7 import 'dart:uri';
8 import 'dart:collection' show LinkedHashMap; 8 import 'dart:collection' show LinkedHashMap;
9 9
10 import 'elements.dart'; 10 import 'elements.dart';
(...skipping 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after
1994 // Represents a reference to a statement or switch-case, either by label or the 1994 // Represents a reference to a statement or switch-case, either by label or the
1995 // default target of a break or continue. 1995 // default target of a break or continue.
1996 class TargetElementX extends ElementX implements TargetElement { 1996 class TargetElementX extends ElementX implements TargetElement {
1997 final Node statement; 1997 final Node statement;
1998 final int nestingLevel; 1998 final int nestingLevel;
1999 Link<LabelElement> labels = const Link<LabelElement>(); 1999 Link<LabelElement> labels = const Link<LabelElement>();
2000 bool isBreakTarget = false; 2000 bool isBreakTarget = false;
2001 bool isContinueTarget = false; 2001 bool isContinueTarget = false;
2002 2002
2003 TargetElementX(this.statement, this.nestingLevel, Element enclosingElement) 2003 TargetElementX(this.statement, this.nestingLevel, Element enclosingElement)
2004 : super(const SourceString(""), ElementKind.STATEMENT, enclosingElement); 2004 : super(const SourceString("target"),
2005 ElementKind.STATEMENT, enclosingElement);
ngeoffray 2013/05/14 07:08:51 Odd indentation.
Johnni Winther 2013/05/17 07:03:04 Done.
2005 bool get isTarget => isBreakTarget || isContinueTarget; 2006 bool get isTarget => isBreakTarget || isContinueTarget;
2006 2007
2007 LabelElement addLabel(Label label, String labelName) { 2008 LabelElement addLabel(Label label, String labelName) {
2008 LabelElement result = new LabelElementX(label, labelName, this, 2009 LabelElement result = new LabelElementX(label, labelName, this,
2009 enclosingElement); 2010 enclosingElement);
2010 labels = labels.prepend(result); 2011 labels = labels.prepend(result);
2011 return result; 2012 return result;
2012 } 2013 }
2013 2014
2014 Node parseNode(DiagnosticListener l) => statement; 2015 Node parseNode(DiagnosticListener l) => statement;
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
2079 2080
2080 MetadataAnnotation ensureResolved(Compiler compiler) { 2081 MetadataAnnotation ensureResolved(Compiler compiler) {
2081 if (resolutionState == STATE_NOT_STARTED) { 2082 if (resolutionState == STATE_NOT_STARTED) {
2082 compiler.resolver.resolveMetadataAnnotation(this); 2083 compiler.resolver.resolveMetadataAnnotation(this);
2083 } 2084 }
2084 return this; 2085 return this;
2085 } 2086 }
2086 2087
2087 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 2088 String toString() => 'MetadataAnnotation($value, $resolutionState)';
2088 } 2089 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698