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

Unified Diff: pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart

Issue 1192103002: Support serialization of the compiler backbone. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 6 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: pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart
diff --git a/pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart b/pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart
index fd2504aaaee640b85c45a775131b2f649a476115..38925b5d5667ac05589a8651041bb6d2d6740bcf 100644
--- a/pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart
+++ b/pkg/compiler/lib/src/mirrors/dart2js_library_mirror.dart
@@ -33,15 +33,7 @@ class Dart2JsLibraryMirror
* file name (for scripts without a library tag). The latter case is used to
* provide a 'library name' for scripts, to use for instance in dartdoc.
*/
- String get _simpleNameString {
- if (_element.libraryTag != null) {
- return _element.libraryTag.name.toString();
- } else {
- // Use the file name as script name.
- String path = _element.canonicalUri.path;
- return path.substring(path.lastIndexOf('/') + 1);
- }
- }
+ String get _simpleNameString => _element.getLibraryOrScriptName();
Symbol get qualifiedName => simpleName;

Powered by Google App Engine
This is Rietveld 408576698