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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend_usage.dart

Issue 2954463002: Refactoring to prepare for kernel based jump targets (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/checked_mode_helpers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698