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

Side by Side Diff: lib/compiler/implementation/elements/elements.dart

Issue 11030048: Minor fixes in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #library('elements'); 5 #library('elements');
6 6
7 #import('dart:uri'); 7 #import('dart:uri');
8 8
9 #import('../tree/tree.dart'); 9 #import('../tree/tree.dart');
10 #import('../scanner/scannerlib.dart'); 10 #import('../scanner/scannerlib.dart');
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 645
646 bool hasLibraryName() => libraryTag !== null; 646 bool hasLibraryName() => libraryTag !== null;
647 647
648 /** 648 /**
649 * Returns the library name (as defined by the #library tag) or for script 649 * Returns the library name (as defined by the #library tag) or for script
650 * (which have no #library tag) the script file name. The latter case is used 650 * (which have no #library tag) the script file name. The latter case is used
651 * to private 'library name' for scripts to use for instance in dartdoc. 651 * to private 'library name' for scripts to use for instance in dartdoc.
652 */ 652 */
653 String getLibraryOrScriptName() { 653 String getLibraryOrScriptName() {
654 if (libraryTag !== null) { 654 if (libraryTag !== null) {
655 return libraryTag.argument.dartString.slowToString(); 655 return libraryTag.name.toString();
656 } else { 656 } else {
657 // Use the file name as script name. 657 // Use the file name as script name.
658 String path = uri.path; 658 String path = uri.path;
659 return path.substring(path.lastIndexOf('/') + 1); 659 return path.substring(path.lastIndexOf('/') + 1);
660 } 660 }
661 } 661 }
662 662
663 // TODO(johnniwinther): Rewrite to avoid the optional argument. 663 // TODO(johnniwinther): Rewrite to avoid the optional argument.
664 Scope buildEnclosingScope({bool patchScope: false}) { 664 Scope buildEnclosingScope({bool patchScope: false}) {
665 if (origin !== null) { 665 if (origin !== null) {
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after
1873 1873
1874 MetadataAnnotation ensureResolved(Compiler compiler) { 1874 MetadataAnnotation ensureResolved(Compiler compiler) {
1875 if (resolutionState == STATE_NOT_STARTED) { 1875 if (resolutionState == STATE_NOT_STARTED) {
1876 compiler.resolver.resolveMetadataAnnotation(this); 1876 compiler.resolver.resolveMetadataAnnotation(this);
1877 } 1877 }
1878 return this; 1878 return this;
1879 } 1879 }
1880 1880
1881 String toString() => 'MetadataAnnotation($value, $resolutionState)'; 1881 String toString() => 'MetadataAnnotation($value, $resolutionState)';
1882 } 1882 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698