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

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

Issue 2851163002: Handle symbol literals in closed_world2_test (Closed)
Patch Set: Reinsert test code Created 3 years, 7 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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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_impact.dart ('k') | pkg/compiler/lib/src/resolution/resolution_strategy.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698