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

Unified Diff: lib/compiler/implementation/ssa/closure.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: Add test. 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
« no previous file with comments | « lib/compiler/implementation/scanner/scanner_task.dart ('k') | lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/closure.dart
diff --git a/lib/compiler/implementation/ssa/closure.dart b/lib/compiler/implementation/ssa/closure.dart
index 82ee51afec661305c02f58d0dda510b39cce048d..09e025b3f8b8443de8f881e6a425bd70af186478 100644
--- a/lib/compiler/implementation/ssa/closure.dart
+++ b/lib/compiler/implementation/ssa/closure.dart
@@ -14,7 +14,12 @@ class ClosureFieldElement extends Element {
class ClosureClassElement extends ClassElement {
ClosureClassElement(Compiler compiler, Element enclosingElement)
- : super(compiler.closureClass.name, enclosingElement) {
+ : super(compiler.closureClass.name,
+ enclosingElement,
+ // By assigning a fresh class-id we make sure that the hashcode
+ // is unique, but also emit closure class after all other
+ // classes (since the emitter sorts classes by their id).
+ compiler.universe.getNextFreeClassId()) {
isResolved = true;
compiler.closureClass.ensureResolved(compiler);
supertype = compiler.closureClass.computeType(compiler);
« no previous file with comments | « lib/compiler/implementation/scanner/scanner_task.dart ('k') | lib/compiler/implementation/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698