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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart

Issue 12517012: Revert "Revert "Use interceptor convention for methods declared on native classes."" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
index cd1d7c01d8eb21ed87bd59808388b9bf3de62cc5..1d52f469ec7bd065f07fe41756bc24db5948c18c 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/namer.dart
@@ -552,9 +552,16 @@ class Namer implements ClosureNamer {
if (cls == backend.jsBoolClass) return "b";
return cls.name.slowToString();
}
+ List<String> names = classes
+ .where((cls) => !cls.isNative())
+ .map(abbreviate)
+ .toList();
+ // There is one dispatch mechanism for all native classes.
+ if (classes.any((cls) => cls.isNative())) {
+ names.add("x");
+ }
// Sort the names of the classes after abbreviating them to ensure
// the suffix is stable and predictable for the suggested names.
- List<String> names = classes.map(abbreviate).toList();
names.sort();
return names.join();
}

Powered by Google App Engine
This is Rietveld 408576698