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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart

Issue 1511383002: Revert "Canonical output ordering for constants." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years 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: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index 9e81bca631b5918104099b25a6888581e2cce847..95f0c3b3ee73eef20ddb892d81a082ade3a16157 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -56,7 +56,6 @@ import '../../js_backend/js_backend.dart' show
import '../../util/uri_extras.dart' show
relativize;
-import '../constant_ordering.dart' show deepCompareConstants;
import '../headers.dart';
import '../js_emitter.dart' show
NativeEmitter;
@@ -141,9 +140,9 @@ class ModelEmitter {
// which compresses a tiny bit better.
int r = namer.constantLongName(a).compareTo(namer.constantLongName(b));
if (r != 0) return r;
-
- // Resolve collisions in the long name by using a structural order.
- return deepCompareConstants(a, b);
+ // Resolve collisions in the long name by using the constant name (i.e. JS
+ // name) which is unique.
+ return namer.constantName(a).compareTo(namer.constantName(b));
}
js.Expression generateStaticClosureAccess(FunctionElement element) {
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/lazy_emitter/model_emitter.dart ('k') | tests/compiler/dart2js_extra/many_constants_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698