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

Side by Side Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 1553253002: Tweaks for compatibilities with summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/type.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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 analyzer.src.dart.element.element; 5 library analyzer.src.dart.element.element;
6 6
7 import 'dart:collection'; 7 import 'dart:collection';
8 import 'dart:math' show min; 8 import 'dart:math' show min;
9 9
10 import 'package:analyzer/dart/element/element.dart'; 10 import 'package:analyzer/dart/element/element.dart';
(...skipping 1789 matching lines...) Expand 10 before | Expand all | Expand 10 after
1800 @override 1800 @override
1801 bool get isSynthetic => hasModifier(Modifier.SYNTHETIC); 1801 bool get isSynthetic => hasModifier(Modifier.SYNTHETIC);
1802 1802
1803 @override 1803 @override
1804 LibraryElement get library => 1804 LibraryElement get library =>
1805 getAncestor((element) => element is LibraryElement); 1805 getAncestor((element) => element is LibraryElement);
1806 1806
1807 @override 1807 @override
1808 ElementLocation get location { 1808 ElementLocation get location {
1809 if (_cachedLocation == null) { 1809 if (_cachedLocation == null) {
1810 if (library == null) {
1811 return new ElementLocationImpl.con1(this);
1812 }
1810 _cachedLocation = new ElementLocationImpl.con1(this); 1813 _cachedLocation = new ElementLocationImpl.con1(this);
1811 } 1814 }
1812 return _cachedLocation; 1815 return _cachedLocation;
1813 } 1816 }
1814 1817
1815 @override 1818 @override
1816 String get name => _name; 1819 String get name => _name;
1817 1820
1818 void set name(String name) { 1821 void set name(String name) {
1819 this._name = name; 1822 this._name = name;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
1853 } 1856 }
1854 1857
1855 @override 1858 @override
1856 CompilationUnit get unit => context.resolveCompilationUnit(source, library); 1859 CompilationUnit get unit => context.resolveCompilationUnit(source, library);
1857 1860
1858 @override 1861 @override
1859 bool operator ==(Object object) { 1862 bool operator ==(Object object) {
1860 if (identical(this, object)) { 1863 if (identical(this, object)) {
1861 return true; 1864 return true;
1862 } 1865 }
1863 if (object == null || hashCode != object.hashCode) { 1866 return object is Element &&
1864 return false; 1867 object.kind == kind &&
1865 } 1868 object.location == location;
1866 return object.runtimeType == runtimeType &&
1867 (object as Element).location == location;
1868 } 1869 }
1869 1870
1870 /** 1871 /**
1871 * Append a textual representation of this element to the given [buffer]. 1872 * Append a textual representation of this element to the given [buffer].
1872 */ 1873 */
1873 void appendTo(StringBuffer buffer) { 1874 void appendTo(StringBuffer buffer) {
1874 if (_name == null) { 1875 if (_name == null) {
1875 buffer.write("<unnamed "); 1876 buffer.write("<unnamed ");
1876 buffer.write(runtimeType.toString()); 1877 buffer.write(runtimeType.toString());
1877 buffer.write(">"); 1878 buffer.write(">");
(...skipping 2698 matching lines...) Expand 10 before | Expand all | Expand 10 after
4576 4577
4577 @override 4578 @override
4578 void visitElement(Element element) { 4579 void visitElement(Element element) {
4579 int offset = element.nameOffset; 4580 int offset = element.nameOffset;
4580 if (offset != -1) { 4581 if (offset != -1) {
4581 map[offset] = element; 4582 map[offset] = element;
4582 } 4583 }
4583 super.visitElement(element); 4584 super.visitElement(element);
4584 } 4585 }
4585 } 4586 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/type.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698