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

Unified Diff: sdk/lib/_internal/compiler/implementation/mirrors_used.dart

Issue 266913017: Convert property methods into getters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 6 years, 7 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/mirrors_used.dart
diff --git a/sdk/lib/_internal/compiler/implementation/mirrors_used.dart b/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
index 3041a4214a1a2c0961988c8bdd71d18763778118..2a5cefb4340d6ec9b0e709a7088bf4500e676277 100644
--- a/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
+++ b/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
@@ -117,7 +117,7 @@ class MirrorUsageAnalyzerTask extends CompilerTask {
/// the resolver to suppress hints about using new Symbol or
/// MirrorSystem.getName.
bool hasMirrorUsage(Element element) {
- LibraryElement library = element.getLibrary();
+ LibraryElement library = element.library;
// Internal libraries always have implicit mirror usage.
return library.isInternalLibrary
|| (librariesWithUsage != null
@@ -136,7 +136,7 @@ class MirrorUsageAnalyzerTask extends CompilerTask {
MirrorUsageBuilder builder =
new MirrorUsageBuilder(
- analyzer, mapping.currentElement.getLibrary(), named.expression,
+ analyzer, mapping.currentElement.library, named.expression,
value, mapping);
if (named.name.source == 'symbols') {
@@ -435,14 +435,14 @@ class MirrorUsageBuilder {
/// Find the first non-implementation interface of constant.
DartType apiTypeOf(Constant constant) {
DartType type = constant.computeType(compiler);
- LibraryElement library = type.element.getLibrary();
+ LibraryElement library = type.element.library;
if (type.kind == TypeKind.INTERFACE && library.isInternalLibrary) {
InterfaceType interface = type;
ClassElement cls = type.element;
cls.ensureResolved(compiler);
for (DartType supertype in cls.allSupertypes) {
if (supertype.kind == TypeKind.INTERFACE
- && !supertype.element.getLibrary().isInternalLibrary) {
+ && !supertype.element.library.isInternalLibrary) {
return interface.asInstanceOf(supertype.element);
}
}
@@ -526,7 +526,7 @@ class MirrorUsageBuilder {
for (String identifier in identifiers) {
Element e = findLocalMemberIn(current, identifier);
if (e == null) {
- if (current.isLibrary()) {
+ if (current.isLibrary) {
LibraryElement library = current;
compiler.reportHint(
spannable, MessageKind.MIRRORS_CANNOT_RESOLVE_IN_LIBRARY,
@@ -549,7 +549,7 @@ class MirrorUsageBuilder {
Element findLocalMemberIn(Element element, String name) {
if (element is ScopeContainerElement) {
ScopeContainerElement scope = element;
- if (element.isClass()) {
+ if (element.isClass) {
ClassElement cls = element;
cls.ensureResolved(compiler);
}

Powered by Google App Engine
This is Rietveld 408576698