| 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 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1049 if (linkedReference.kind == ReferenceKind.function) { | 1049 if (linkedReference.kind == ReferenceKind.function) { |
| 1050 // Local function | 1050 // Local function |
| 1051 _references[index] = resolveRef(containingReference) | 1051 _references[index] = resolveRef(containingReference) |
| 1052 .getLocalFunction(linkedReference.localIndex) ?? | 1052 .getLocalFunction(linkedReference.localIndex) ?? |
| 1053 UndefinedElementForLink.instance; | 1053 UndefinedElementForLink.instance; |
| 1054 } else { | 1054 } else { |
| 1055 _references[index] = | 1055 _references[index] = |
| 1056 resolveRef(containingReference).getContainedName(name); | 1056 resolveRef(containingReference).getContainedName(name); |
| 1057 } | 1057 } |
| 1058 } else if (linkedReference.dependency == 0) { | 1058 } else if (linkedReference.dependency == 0) { |
| 1059 if (name == 'void') { | 1059 if (linkedReference.kind == ReferenceKind.unresolved) { |
| 1060 _references[index] = UndefinedElementForLink.instance; |
| 1061 } else if (name == 'void') { |
| 1060 _references[index] = enclosingElement._linker.voidElement; | 1062 _references[index] = enclosingElement._linker.voidElement; |
| 1061 } else if (name == '*bottom*') { | 1063 } else if (name == '*bottom*') { |
| 1062 _references[index] = enclosingElement._linker.bottomElement; | 1064 _references[index] = enclosingElement._linker.bottomElement; |
| 1063 } else if (name == 'dynamic') { | 1065 } else if (name == 'dynamic') { |
| 1064 _references[index] = enclosingElement._linker.dynamicElement; | 1066 _references[index] = enclosingElement._linker.dynamicElement; |
| 1065 } else { | 1067 } else { |
| 1066 _references[index] = enclosingElement.getContainedName(name); | 1068 _references[index] = enclosingElement.getContainedName(name); |
| 1067 } | 1069 } |
| 1068 } else { | 1070 } else { |
| 1069 LibraryElementForLink dependency = | 1071 LibraryElementForLink dependency = |
| (...skipping 4235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5305 } | 5307 } |
| 5306 | 5308 |
| 5307 /** | 5309 /** |
| 5308 * This exception is thrown when [ExprTypeComputer] cannot inference the type. | 5310 * This exception is thrown when [ExprTypeComputer] cannot inference the type. |
| 5309 */ | 5311 */ |
| 5310 class _InferenceFailedError { | 5312 class _InferenceFailedError { |
| 5311 final String message; | 5313 final String message; |
| 5312 | 5314 |
| 5313 _InferenceFailedError(this.message); | 5315 _InferenceFailedError(this.message); |
| 5314 } | 5316 } |
| OLD | NEW |