OLD | NEW |
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2017, 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 import '../common.dart'; | 5 import '../common.dart'; |
6 import '../common_elements.dart'; | 6 import '../common_elements.dart'; |
7 import '../elements/elements.dart' show Element; | 7 import '../elements/elements.dart' show Element; |
8 import '../elements/entities.dart'; | 8 import '../elements/entities.dart'; |
9 import '../elements/types.dart'; | 9 import '../elements/types.dart'; |
10 import '../util/util.dart' show Setlet; | 10 import '../util/util.dart' show Setlet; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 } | 159 } |
160 | 160 |
161 bool _isValidEntity(Entity element) { | 161 bool _isValidEntity(Entity element) { |
162 if (element is ConstructorEntity && | 162 if (element is ConstructorEntity && |
163 (element == _commonElements.streamIteratorConstructor || | 163 (element == _commonElements.streamIteratorConstructor || |
164 _commonElements.isSymbolConstructor(element) || | 164 _commonElements.isSymbolConstructor(element) || |
165 _commonElements.isSymbolValidatedConstructor(element) || | 165 _commonElements.isSymbolValidatedConstructor(element) || |
166 element == _commonElements.syncCompleterConstructor)) { | 166 element == _commonElements.syncCompleterConstructor)) { |
167 // TODO(johnniwinther): These are valid but we could be more precise. | 167 // TODO(johnniwinther): These are valid but we could be more precise. |
168 return true; | 168 return true; |
169 } else if (element == _commonElements.symbolClass || | 169 } else if (element == _commonElements.symbolImplementationClass || |
170 element == _commonElements.objectNoSuchMethod) { | 170 element == _commonElements.objectNoSuchMethod) { |
171 // TODO(johnniwinther): These are valid but we could be more precise. | 171 // TODO(johnniwinther): These are valid but we could be more precise. |
172 return true; | 172 return true; |
173 } else if (element == _commonElements.listClass || | 173 } else if (element == _commonElements.listClass || |
174 element == _commonElements.mapLiteralClass || | 174 element == _commonElements.mapLiteralClass || |
175 element == _commonElements.functionClass || | 175 element == _commonElements.functionClass || |
176 element == _commonElements.stringClass) { | 176 element == _commonElements.stringClass) { |
177 // TODO(johnniwinther): Avoid these. | 177 // TODO(johnniwinther): Avoid these. |
178 return true; | 178 return true; |
179 } else if (element == _commonElements.genericNoSuchMethod || | 179 } else if (element == _commonElements.genericNoSuchMethod || |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
342 _globalFunctionDependencies ?? const <FunctionEntity>[]; | 342 _globalFunctionDependencies ?? const <FunctionEntity>[]; |
343 | 343 |
344 @override | 344 @override |
345 Iterable<ClassEntity> get globalClassDependencies => | 345 Iterable<ClassEntity> get globalClassDependencies => |
346 _globalClassDependencies ?? const <ClassEntity>[]; | 346 _globalClassDependencies ?? const <ClassEntity>[]; |
347 | 347 |
348 Iterable<FunctionEntity> get helperFunctionsUsed => _helperFunctionsUsed; | 348 Iterable<FunctionEntity> get helperFunctionsUsed => _helperFunctionsUsed; |
349 | 349 |
350 Iterable<ClassEntity> get helperClassesUsed => _helperClassesUsed; | 350 Iterable<ClassEntity> get helperClassesUsed => _helperClassesUsed; |
351 } | 351 } |
OLD | NEW |