Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 'modelx.dart'; | 9 import 'modelx.dart'; |
| 10 import '../tree/tree.dart'; | 10 import '../tree/tree.dart'; |
| (...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 462 abstract class CompilationUnitElement extends Element { | 462 abstract class CompilationUnitElement extends Element { |
| 463 Script get script; | 463 Script get script; |
| 464 PartOf get partTag; | 464 PartOf get partTag; |
| 465 | 465 |
| 466 void addMember(Element element, DiagnosticListener listener); | 466 void addMember(Element element, DiagnosticListener listener); |
| 467 void setPartOf(PartOf tag, DiagnosticListener listener); | 467 void setPartOf(PartOf tag, DiagnosticListener listener); |
| 468 bool get hasMembers; | 468 bool get hasMembers; |
| 469 } | 469 } |
| 470 | 470 |
| 471 abstract class LibraryElement extends Element implements ScopeContainerElement { | 471 abstract class LibraryElement extends Element implements ScopeContainerElement { |
| 472 Uri get uri; | 472 /** |
| 473 * The canonical uri for this library. | |
| 474 * | |
| 475 * For user libraries the canonical uri is the script uri. For platform | |
| 476 * libraries the canonical uri is of the form [:dart:x:], and for a patch | |
| 477 * library for [:dart:x:] the canonical uri is [:patch:x:]. | |
|
ahe
2013/01/24 10:00:57
I thought you'd get rid of the "patch" scheme?
Johnni Winther
2013/01/24 13:04:59
It is.
| |
| 478 */ | |
| 479 Uri get canonicalUri; | |
| 473 CompilationUnitElement get entryCompilationUnit; | 480 CompilationUnitElement get entryCompilationUnit; |
| 474 Link<CompilationUnitElement> get compilationUnits; | 481 Link<CompilationUnitElement> get compilationUnits; |
| 475 Link<LibraryTag> get tags; | 482 Link<LibraryTag> get tags; |
| 476 LibraryName get libraryTag; | 483 LibraryName get libraryTag; |
| 477 Link<Element> get exports; | 484 Link<Element> get exports; |
| 478 | 485 |
| 486 /** | |
| 487 * [:true:] if this library is part of the platform, that is its canonical | |
| 488 * uri has the scheme 'dart'. | |
| 489 */ | |
| 479 bool get isPlatformLibrary; | 490 bool get isPlatformLibrary; |
| 491 | |
| 492 /** | |
| 493 * [:true:] if this library is a platform library whose path starts with | |
| 494 * an underscore. | |
| 495 */ | |
| 496 bool get isInternalLibrary; | |
| 480 bool get canUseNative; | 497 bool get canUseNative; |
| 481 bool get exportsHandled; | 498 bool get exportsHandled; |
| 482 | 499 |
| 483 // TODO(kasperl): We should try to get rid of these. | 500 // TODO(kasperl): We should try to get rid of these. |
| 484 void set canUseNative(bool value); | 501 void set canUseNative(bool value); |
| 485 void set libraryTag(LibraryName value); | 502 void set libraryTag(LibraryName value); |
| 486 | 503 |
| 487 LibraryElement get implementation; | 504 LibraryElement get implementation; |
| 488 | 505 |
| 489 void addCompilationUnit(CompilationUnitElement element); | 506 void addCompilationUnit(CompilationUnitElement element); |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 762 Element get annotatedElement; | 779 Element get annotatedElement; |
| 763 int get resolutionState; | 780 int get resolutionState; |
| 764 Token get beginToken; | 781 Token get beginToken; |
| 765 | 782 |
| 766 // TODO(kasperl): Try to get rid of these. | 783 // TODO(kasperl): Try to get rid of these. |
| 767 void set annotatedElement(Element value); | 784 void set annotatedElement(Element value); |
| 768 void set resolutionState(int value); | 785 void set resolutionState(int value); |
| 769 | 786 |
| 770 MetadataAnnotation ensureResolved(Compiler compiler); | 787 MetadataAnnotation ensureResolved(Compiler compiler); |
| 771 } | 788 } |
| OLD | NEW |