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

Side by Side Diff: pkg/analyzer/lib/src/summary/link.dart

Issue 1983153002: Change ClassElementForLink.getContainedName() to include non-static members. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/linker_test.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) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 /** 5 /**
6 * This library is capable of producing linked summaries from unlinked 6 * This library is capable of producing linked summaries from unlinked
7 * ones (or prelinked ones). It functions by building a miniature 7 * ones (or prelinked ones). It functions by building a miniature
8 * element model to represent the contents of the summaries, and then 8 * element model to represent the contents of the summaries, and then
9 * scanning the element model to gather linked information and adding 9 * scanning the element model to gather linked information and adding
10 * it to the summary data structures. 10 * it to the summary data structures.
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 367
368 @override 368 @override
369 ReferenceableElementForLink getContainedName(String name) { 369 ReferenceableElementForLink getContainedName(String name) {
370 if (_containedNames == null) { 370 if (_containedNames == null) {
371 _containedNames = <String, ReferenceableElementForLink>{}; 371 _containedNames = <String, ReferenceableElementForLink>{};
372 // TODO(paulberry): what's the correct way to handle name conflicts? 372 // TODO(paulberry): what's the correct way to handle name conflicts?
373 for (ConstructorElementForLink constructor in constructors) { 373 for (ConstructorElementForLink constructor in constructors) {
374 _containedNames[constructor.name] = constructor; 374 _containedNames[constructor.name] = constructor;
375 } 375 }
376 for (PropertyAccessorElementForLink accessor in accessors) { 376 for (PropertyAccessorElementForLink accessor in accessors) {
377 if (accessor.isStatic) { 377 _containedNames[accessor.name] = accessor;
378 _containedNames[accessor.name] = accessor;
379 }
380 } 378 }
381 for (MethodElementForLink method in methods) { 379 for (MethodElementForLink method in methods) {
382 if (method.isStatic) { 380 _containedNames[method.name] = method;
383 _containedNames[method.name] = method;
384 }
385 } 381 }
386 } 382 }
387 return _containedNames.putIfAbsent( 383 return _containedNames.putIfAbsent(
388 name, () => UndefinedElementForLink.instance); 384 name, () => UndefinedElementForLink.instance);
389 } 385 }
390 386
391 /** 387 /**
392 * Perform type inference and cycle detection on this class and 388 * Perform type inference and cycle detection on this class and
393 * store the resulting information in [compilationUnit]. 389 * store the resulting information in [compilationUnit].
394 */ 390 */
(...skipping 4387 matching lines...) Expand 10 before | Expand all | Expand 10 after
4782 * there are no type parameters in scope. 4778 * there are no type parameters in scope.
4783 */ 4779 */
4784 TypeParameterizedElementForLink get _typeParameterContext; 4780 TypeParameterizedElementForLink get _typeParameterContext;
4785 4781
4786 @override 4782 @override
4787 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); 4783 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation);
4788 4784
4789 @override 4785 @override
4790 String toString() => '$enclosingElement.$name'; 4786 String toString() => '$enclosingElement.$name';
4791 } 4787 }
OLDNEW
« no previous file with comments | « no previous file | pkg/analyzer/test/src/summary/linker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698