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

Side by Side Diff: lib/compiler/implementation/elements/elements.dart

Issue 10915083: Change assert implementation to not depend on a top-level function called 'assert'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Moved assert detection further down. Now demetered. Created 8 years, 3 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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'); 5 #library('elements');
6 6
7 #import('dart:uri'); 7 #import('dart:uri');
8 8
9 #import('../tree/tree.dart'); 9 #import('../tree/tree.dart');
10 #import('../scanner/scannerlib.dart'); 10 #import('../scanner/scannerlib.dart');
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 kind === ElementKind.GENERATIVE_CONSTRUCTOR_BODY; 151 kind === ElementKind.GENERATIVE_CONSTRUCTOR_BODY;
152 bool isCompilationUnit() => kind === ElementKind.COMPILATION_UNIT; 152 bool isCompilationUnit() => kind === ElementKind.COMPILATION_UNIT;
153 bool isClass() => kind === ElementKind.CLASS; 153 bool isClass() => kind === ElementKind.CLASS;
154 bool isPrefix() => kind === ElementKind.PREFIX; 154 bool isPrefix() => kind === ElementKind.PREFIX;
155 bool isVariable() => kind === ElementKind.VARIABLE; 155 bool isVariable() => kind === ElementKind.VARIABLE;
156 bool isParameter() => kind === ElementKind.PARAMETER; 156 bool isParameter() => kind === ElementKind.PARAMETER;
157 bool isStatement() => kind === ElementKind.STATEMENT; 157 bool isStatement() => kind === ElementKind.STATEMENT;
158 bool isTypedef() => kind === ElementKind.TYPEDEF; 158 bool isTypedef() => kind === ElementKind.TYPEDEF;
159 bool isTypeVariable() => kind === ElementKind.TYPE_VARIABLE; 159 bool isTypeVariable() => kind === ElementKind.TYPE_VARIABLE;
160 bool isField() => kind === ElementKind.FIELD; 160 bool isField() => kind === ElementKind.FIELD;
161 bool isAbstractField() => kind === ElementKind.ABSTRACT_FIELD;
161 bool isGetter() => kind === ElementKind.GETTER; 162 bool isGetter() => kind === ElementKind.GETTER;
162 bool isSetter() => kind === ElementKind.SETTER; 163 bool isSetter() => kind === ElementKind.SETTER;
163 bool isAccessor() => isGetter() || isSetter(); 164 bool isAccessor() => isGetter() || isSetter();
164 bool isForeign() => kind === ElementKind.FOREIGN; 165 bool isForeign() => kind === ElementKind.FOREIGN;
165 bool isLibrary() => kind === ElementKind.LIBRARY; 166 bool isLibrary() => kind === ElementKind.LIBRARY;
166 bool impliesType() => (kind.category & ElementCategory.IMPLIES_TYPE) != 0; 167 bool impliesType() => (kind.category & ElementCategory.IMPLIES_TYPE) != 0;
167 bool isExtendable() => (kind.category & ElementCategory.IS_EXTENDABLE) != 0; 168 bool isExtendable() => (kind.category & ElementCategory.IS_EXTENDABLE) != 0;
168 169
169 /** See [ErroneousElement] for documentation. */ 170 /** See [ErroneousElement] for documentation. */
170 bool isErroneous() => false; 171 bool isErroneous() => false;
(...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after
1652 1653
1653 MetadataAnnotation ensureResolved(Compiler compiler) { 1654 MetadataAnnotation ensureResolved(Compiler compiler) {
1654 if (resolutionState == STATE_NOT_STARTED) { 1655 if (resolutionState == STATE_NOT_STARTED) {
1655 compiler.resolver.resolveMetadataAnnotation(this); 1656 compiler.resolver.resolveMetadataAnnotation(this);
1656 } 1657 }
1657 return this; 1658 return this;
1658 } 1659 }
1659 1660
1660 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 1661 String toString() => 'MetadataAnnotation($value, $resolutionState)';
1661 } 1662 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698