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

Unified Diff: dart/sdk/lib/_internal/lib/js_mirrors.dart

Issue 23180004: Change simpleName of anonymous mixin applications. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged and removed TODO. Created 7 years, 3 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 | dart/tests/lib/lib.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/lib/js_mirrors.dart
diff --git a/dart/sdk/lib/_internal/lib/js_mirrors.dart b/dart/sdk/lib/_internal/lib/js_mirrors.dart
index 8911a689052d16f099f2a8ed153d56ba3b311d55..17057ecf48b14650bfc0c598a77a5a067fc92673 100644
--- a/dart/sdk/lib/_internal/lib/js_mirrors.dart
+++ b/dart/sdk/lib/_internal/lib/js_mirrors.dart
@@ -491,6 +491,7 @@ class JsMixinApplication extends JsTypeMirror with JsObjectMirror
implements ClassMirror {
final ClassMirror superclass;
final ClassMirror mixin;
+ Symbol _cachedSimpleName;
JsMixinApplication(ClassMirror superclass, ClassMirror mixin,
String mangledName)
@@ -501,7 +502,11 @@ class JsMixinApplication extends JsTypeMirror with JsObjectMirror
String get _prettyName => 'ClassMirror';
Symbol get simpleName {
- return s('${n(mixin.qualifiedName)}(${n(superclass.qualifiedName)})');
+ if (_cachedSimpleName != null) return _cachedSimpleName;
+ String superName = n(superclass.qualifiedName);
+ return _cachedSimpleName = (superName.contains(' with '))
+ ? s('$superName, ${n(mixin.qualifiedName)}')
+ : s('$superName with ${n(mixin.qualifiedName)}');
}
Symbol get qualifiedName => simpleName;
« no previous file with comments | « no previous file | dart/tests/lib/lib.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698