Chromium Code Reviews| 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 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2283 dependencies, | 2283 dependencies, |
| 2284 variableElement.unlinkedVariable.constExpr, | 2284 variableElement.unlinkedVariable.constExpr, |
| 2285 variableElement.compilationUnit); | 2285 variableElement.compilationUnit); |
| 2286 return dependencies; | 2286 return dependencies; |
| 2287 } | 2287 } |
| 2288 | 2288 |
| 2289 @override | 2289 @override |
| 2290 void evaluate(bool inCycle) { | 2290 void evaluate(bool inCycle) { |
| 2291 if (inCycle) { | 2291 if (inCycle) { |
| 2292 _inferredType = DynamicTypeImpl.instance; | 2292 _inferredType = DynamicTypeImpl.instance; |
| 2293 } else if (variableElement.unlinkedVariable.constExpr.isInvalid) { | 2293 } else if (!variableElement.unlinkedVariable.constExpr.isValidConst) { |
| 2294 // TODO(paulberry): implement. | 2294 // TODO(paulberry): implement. |
|
Paul Berry
2016/04/05 21:19:33
So that I don't become confused later, would you m
scheglov
2016/04/05 21:26:26
Done.
| |
| 2295 throw new UnimplementedError(); | 2295 throw new UnimplementedError(); |
| 2296 } else { | 2296 } else { |
| 2297 // Perform RPN evaluation of the cycle, using a stack of | 2297 // Perform RPN evaluation of the cycle, using a stack of |
| 2298 // inferred types. | 2298 // inferred types. |
| 2299 List<DartType> stack = <DartType>[]; | 2299 List<DartType> stack = <DartType>[]; |
| 2300 int refPtr = 0; | 2300 int refPtr = 0; |
| 2301 int intPtr = 0; | 2301 int intPtr = 0; |
| 2302 UnlinkedConst unlinkedConst = variableElement.unlinkedVariable.constExpr; | 2302 UnlinkedConst unlinkedConst = variableElement.unlinkedVariable.constExpr; |
| 2303 TypeProvider typeProvider = | 2303 TypeProvider typeProvider = |
| 2304 variableElement.compilationUnit.enclosingElement._linker.typeProvider; | 2304 variableElement.compilationUnit.enclosingElement._linker.typeProvider; |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2844 /** | 2844 /** |
| 2845 * Throw away any information stored in the summary by a previous call to | 2845 * Throw away any information stored in the summary by a previous call to |
| 2846 * [link]. | 2846 * [link]. |
| 2847 */ | 2847 */ |
| 2848 void unlink() { | 2848 void unlink() { |
| 2849 for (LibraryElementInBuildUnit library in _librariesInBuildUnit) { | 2849 for (LibraryElementInBuildUnit library in _librariesInBuildUnit) { |
| 2850 library.unlink(); | 2850 library.unlink(); |
| 2851 } | 2851 } |
| 2852 } | 2852 } |
| 2853 } | 2853 } |
| OLD | NEW |