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

Unified Diff: lib/compiler/implementation/emitter.dart

Issue 10310040: Sort the output (for now just the classes and instance members). (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Remove (now) unnecessary changes. 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/emitter.dart
diff --git a/lib/compiler/implementation/emitter.dart b/lib/compiler/implementation/emitter.dart
index dda702ae1b39e367d535a9e8d545d9378d995eb1..707638d806acb2111531b2466e6eceefa36a1e6a 100644
--- a/lib/compiler/implementation/emitter.dart
+++ b/lib/compiler/implementation/emitter.dart
@@ -487,7 +487,12 @@ function() {
neededClasses.add(superclass);
}
}
- for (ClassElement element in neededClasses) {
+ List<ClassElement> sortedClasses =
+ new List<ClassElement>.from(neededClasses);
+ sortedClasses.sort((ClassElement class1, ClassElement class2) {
kasperl 2012/05/09 08:15:20 Maybe describe what kind of sorting this implies?
floitsch 2012/05/09 10:55:08 I added a comment. We don't rely on the sorting an
+ return class2.id - class1.id;
+ });
+ for (ClassElement element in sortedClasses) {
generateClass(element, buffer);
}

Powered by Google App Engine
This is Rietveld 408576698