| 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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 .contains('_internal/js_runtime/lib/')) || | 147 .contains('_internal/js_runtime/lib/')) || |
| 148 element.library == _commonElements.jsHelperLibrary || | 148 element.library == _commonElements.jsHelperLibrary || |
| 149 element.library == _commonElements.interceptorsLibrary || | 149 element.library == _commonElements.interceptorsLibrary || |
| 150 element.library == _commonElements.isolateHelperLibrary) { | 150 element.library == _commonElements.isolateHelperLibrary) { |
| 151 // TODO(johnniwinther): We should be more precise about these. | 151 // TODO(johnniwinther): We should be more precise about these. |
| 152 return true; | 152 return true; |
| 153 } else { | 153 } else { |
| 154 return false; | 154 return false; |
| 155 } | 155 } |
| 156 } | 156 } |
| 157 // TODO(johnniwinther): Support remaining checks on [Entity]s. | 157 // TODO(redemption): Support remaining checks on [Entity]s. |
| 158 return true; | 158 return true; |
| 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. |
| (...skipping 174 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 |