| 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 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1283 List<ConstNode> dependencies, | 1283 List<ConstNode> dependencies, |
| 1284 UnlinkedConst unlinkedConst, | 1284 UnlinkedConst unlinkedConst, |
| 1285 CompilationUnitElementForLink compilationUnit) { | 1285 CompilationUnitElementForLink compilationUnit) { |
| 1286 if (unlinkedConst == null) { | 1286 if (unlinkedConst == null) { |
| 1287 return; | 1287 return; |
| 1288 } | 1288 } |
| 1289 int refPtr = 0; | 1289 int refPtr = 0; |
| 1290 for (UnlinkedConstOperation operation in unlinkedConst.operations) { | 1290 for (UnlinkedConstOperation operation in unlinkedConst.operations) { |
| 1291 switch (operation) { | 1291 switch (operation) { |
| 1292 case UnlinkedConstOperation.pushReference: | 1292 case UnlinkedConstOperation.pushReference: |
| 1293 case UnlinkedConstOperation.invokeMethodRef: |
| 1293 EntityRef ref = unlinkedConst.references[refPtr++]; | 1294 EntityRef ref = unlinkedConst.references[refPtr++]; |
| 1294 ConstVariableNode variable = | 1295 ConstVariableNode variable = |
| 1295 compilationUnit._resolveRef(ref.reference).asConstVariable; | 1296 compilationUnit._resolveRef(ref.reference).asConstVariable; |
| 1296 if (variable != null) { | 1297 if (variable != null) { |
| 1297 dependencies.add(variable); | 1298 dependencies.add(variable); |
| 1298 } | 1299 } |
| 1299 break; | 1300 break; |
| 1300 case UnlinkedConstOperation.makeTypedList: | 1301 case UnlinkedConstOperation.makeTypedList: |
| 1301 refPtr++; | 1302 refPtr++; |
| 1302 break; | 1303 break; |
| (...skipping 3060 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4363 if (type is InterfaceType) { | 4364 if (type is InterfaceType) { |
| 4364 Element result = type.lookUpGetter(name, compilationUnit.library); | 4365 Element result = type.lookUpGetter(name, compilationUnit.library); |
| 4365 result ??= type.lookUpMethod(name, compilationUnit.library); | 4366 result ??= type.lookUpMethod(name, compilationUnit.library); |
| 4366 return result; | 4367 return result; |
| 4367 } | 4368 } |
| 4368 } | 4369 } |
| 4369 // TODO(scheglov): implement for propagated types | 4370 // TODO(scheglov): implement for propagated types |
| 4370 return null; | 4371 return null; |
| 4371 } | 4372 } |
| 4372 } | 4373 } |
| OLD | NEW |