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

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

Issue 10873033: Support non-const instance field initializers. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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 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 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after
1296 * [includeSuperMembers] is [:true:]. 1296 * [includeSuperMembers] is [:true:].
1297 */ 1297 */
1298 void forEachMember([void f(ClassElement enclosingClass, Element member), 1298 void forEachMember([void f(ClassElement enclosingClass, Element member),
1299 includeBackendMembers = false, 1299 includeBackendMembers = false,
1300 includeSuperMembers = false]) { 1300 includeSuperMembers = false]) {
1301 Set<ClassElement> seen = new Set<ClassElement>(); 1301 Set<ClassElement> seen = new Set<ClassElement>();
1302 ClassElement classElement = this; 1302 ClassElement classElement = this;
1303 do { 1303 do {
1304 if (seen.contains(classElement)) return; 1304 if (seen.contains(classElement)) return;
1305 seen.add(classElement); 1305 seen.add(classElement);
1306 for (Element element in classElement.localMembers) { 1306 for (Element element in classElement.localMembers.reverse()) {
kasperl 2012/08/24 11:50:23 Add a comment that explain why the order is import
ngeoffray 2012/08/24 13:01:41 Done.
1307 f(classElement, element); 1307 f(classElement, element);
1308 } 1308 }
1309 if (includeBackendMembers) { 1309 if (includeBackendMembers) {
1310 for (Element element in classElement.backendMembers) { 1310 for (Element element in classElement.backendMembers) {
1311 f(classElement, element); 1311 f(classElement, element);
1312 } 1312 }
1313 } 1313 }
1314 classElement = includeSuperMembers ? classElement.superclass : null; 1314 classElement = includeSuperMembers ? classElement.superclass : null;
1315 } while(classElement !== null); 1315 } while(classElement !== null);
1316 } 1316 }
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
1624 1624
1625 MetadataAnnotation ensureResolved(Compiler compiler) { 1625 MetadataAnnotation ensureResolved(Compiler compiler) {
1626 if (resolutionState == STATE_NOT_STARTED) { 1626 if (resolutionState == STATE_NOT_STARTED) {
1627 compiler.resolver.resolveMetadataAnnotation(this); 1627 compiler.resolver.resolveMetadataAnnotation(this);
1628 } 1628 }
1629 return this; 1629 return this;
1630 } 1630 }
1631 1631
1632 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 1632 String toString() => 'MetadataAnnotation($value, $resolutionState)';
1633 } 1633 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/resolver.dart » ('j') | lib/compiler/implementation/resolver.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698