| OLD | NEW |
| 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 3644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3655 // library cycle containing it. So we shouldn't use the inferred type | 3655 // library cycle containing it. So we shouldn't use the inferred type |
| 3656 // (even if we have already computed it), since that would lead to | 3656 // (even if we have already computed it), since that would lead to |
| 3657 // non-deterministic type inference results. | 3657 // non-deterministic type inference results. |
| 3658 return DynamicTypeImpl.instance; | 3658 return DynamicTypeImpl.instance; |
| 3659 } else { | 3659 } else { |
| 3660 return variable.type; | 3660 return variable.type; |
| 3661 } | 3661 } |
| 3662 } | 3662 } |
| 3663 | 3663 |
| 3664 @override | 3664 @override |
| 3665 ReferenceableElementForLink getContainedName(String name) => | 3665 ReferenceableElementForLink getContainedName(String name) { |
| 3666 UndefinedElementForLink.instance; | 3666 Element element = variable._getContainedElement(name); |
| 3667 return new NonstaticMemberElementForLink(element, variable._constNode); |
| 3668 } |
| 3667 | 3669 |
| 3668 @override | 3670 @override |
| 3669 bool isAccessibleIn(LibraryElement library) => | 3671 bool isAccessibleIn(LibraryElement library) => |
| 3670 !Identifier.isPrivateName(name) || identical(this.library, library); | 3672 !Identifier.isPrivateName(name) || identical(this.library, library); |
| 3671 | 3673 |
| 3672 @override | 3674 @override |
| 3673 void link(CompilationUnitElementInBuildUnit compilationUnit) {} | 3675 void link(CompilationUnitElementInBuildUnit compilationUnit) {} |
| 3674 | 3676 |
| 3675 @override | 3677 @override |
| 3676 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); | 3678 noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4441 if (type is InterfaceType) { | 4443 if (type is InterfaceType) { |
| 4442 Element result = type.lookUpGetter(name, compilationUnit.library); | 4444 Element result = type.lookUpGetter(name, compilationUnit.library); |
| 4443 result ??= type.lookUpMethod(name, compilationUnit.library); | 4445 result ??= type.lookUpMethod(name, compilationUnit.library); |
| 4444 return result; | 4446 return result; |
| 4445 } | 4447 } |
| 4446 } | 4448 } |
| 4447 // TODO(scheglov): implement for propagated types | 4449 // TODO(scheglov): implement for propagated types |
| 4448 return null; | 4450 return null; |
| 4449 } | 4451 } |
| 4450 } | 4452 } |
| OLD | NEW |