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

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

Issue 2832893002: Issue 29398. Infer instance members using InheritanceManager of the ClassElement. (Closed)
Patch Set: Created 3 years, 8 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 | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/lib/src/task/dart.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 1276 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 throw new StateError( 1287 throw new StateError(
1288 'Linker tried to access linked type from current build unit'); 1288 'Linker tried to access linked type from current build unit');
1289 } 1289 }
1290 1290
1291 /** 1291 /**
1292 * Perform type inference and const cycle detection on this 1292 * Perform type inference and const cycle detection on this
1293 * compilation unit. 1293 * compilation unit.
1294 */ 1294 */
1295 void link() { 1295 void link() {
1296 if (library._linker.strongMode) { 1296 if (library._linker.strongMode) {
1297 new InstanceMemberInferrer(enclosingElement._linker.typeProvider, 1297 new InstanceMemberInferrer(
1298 enclosingElement.inheritanceManager, new Set<FieldElement>()) 1298 enclosingElement._linker.typeProvider,
1299 (clazz) => (clazz.library as LibraryElementInBuildUnit)
1300 .inheritanceManager,
1301 new Set<FieldElement>())
1299 .inferCompilationUnit(this); 1302 .inferCompilationUnit(this);
1300 for (TopLevelVariableElementForLink variable in topLevelVariables) { 1303 for (TopLevelVariableElementForLink variable in topLevelVariables) {
1301 variable.link(this); 1304 variable.link(this);
1302 } 1305 }
1303 } 1306 }
1304 for (ClassElementForLink classElement in types) { 1307 for (ClassElementForLink classElement in types) {
1305 classElement.link(this); 1308 classElement.link(this);
1306 } 1309 }
1307 } 1310 }
1308 1311
(...skipping 3998 matching lines...) Expand 10 before | Expand all | Expand 10 after
5307 } 5310 }
5308 5311
5309 /** 5312 /**
5310 * This exception is thrown when [ExprTypeComputer] cannot inference the type. 5313 * This exception is thrown when [ExprTypeComputer] cannot inference the type.
5311 */ 5314 */
5312 class _InferenceFailedError { 5315 class _InferenceFailedError {
5313 final String message; 5316 final String message;
5314 5317
5315 _InferenceFailedError(this.message); 5318 _InferenceFailedError(this.message);
5316 } 5319 }
OLDNEW
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | pkg/analyzer/lib/src/task/dart.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698