| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 library analyzer.src.task.strong_mode; | 5 library analyzer.src.task.strong_mode; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 | 8 |
| 9 import 'package:analyzer/src/generated/ast.dart'; | 9 import 'package:analyzer/src/generated/ast.dart'; |
| 10 import 'package:analyzer/src/generated/element.dart'; | 10 import 'package:analyzer/src/generated/element.dart'; |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 /** | 105 /** |
| 106 * The classes that have been visited while attempting to infer the types of | 106 * The classes that have been visited while attempting to infer the types of |
| 107 * instance members of some base class. | 107 * instance members of some base class. |
| 108 */ | 108 */ |
| 109 HashSet<ClassElementImpl> elementsBeingInferred = | 109 HashSet<ClassElementImpl> elementsBeingInferred = |
| 110 new HashSet<ClassElementImpl>(); | 110 new HashSet<ClassElementImpl>(); |
| 111 | 111 |
| 112 /** | 112 /** |
| 113 * Initialize a newly create inferrer. | 113 * Initialize a newly create inferrer. |
| 114 */ | 114 */ |
| 115 InstanceMemberInferrer(this.typeProvider) { | 115 InstanceMemberInferrer(this.typeProvider, this.typeSystem); |
| 116 typeSystem = new TypeSystemImpl(typeProvider); | |
| 117 } | |
| 118 | 116 |
| 119 /** | 117 /** |
| 120 * Infer type information for all of the instance members in the given | 118 * Infer type information for all of the instance members in the given |
| 121 * compilation [unit]. | 119 * compilation [unit]. |
| 122 */ | 120 */ |
| 123 void inferCompilationUnit(CompilationUnitElement unit) { | 121 void inferCompilationUnit(CompilationUnitElement unit) { |
| 124 inheritanceManager = new InheritanceManager(unit.library); | 122 inheritanceManager = new InheritanceManager(unit.library); |
| 125 unit.types.forEach((ClassElement classElement) { | 123 unit.types.forEach((ClassElement classElement) { |
| 126 try { | 124 try { |
| 127 _inferClass(classElement); | 125 _inferClass(classElement); |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 results.add(element); | 469 results.add(element); |
| 472 } | 470 } |
| 473 } | 471 } |
| 474 } | 472 } |
| 475 } | 473 } |
| 476 | 474 |
| 477 /** | 475 /** |
| 478 * A class of exception that is not used anywhere else. | 476 * A class of exception that is not used anywhere else. |
| 479 */ | 477 */ |
| 480 class _CycleException implements Exception {} | 478 class _CycleException implements Exception {} |
| OLD | NEW |