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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/elements/elements.dart
===================================================================
--- lib/compiler/implementation/elements/elements.dart (revision 11297)
+++ lib/compiler/implementation/elements/elements.dart (working copy)
@@ -1303,7 +1303,12 @@
do {
if (seen.contains(classElement)) return;
seen.add(classElement);
- for (Element element in classElement.localMembers) {
+
+ // Iterate through the members in textual order, which requires
+ // to reverse the data structure [localMembers] we created.
+ // Textual order may be important for certain operations, for
+ // example when emitting the initializers of fields.
+ for (Element element in classElement.localMembers.reverse()) {
f(classElement, element);
}
if (includeBackendMembers) {
« no previous file with comments | « no previous file | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698