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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend_impact.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) 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 dart2js.js_helpers.impact; 5 library dart2js.js_helpers.impact;
6 6
7 import '../common/names.dart'; 7 import '../common/names.dart';
8 import '../common_elements.dart' show CommonElements, ElementEnvironment; 8 import '../common_elements.dart' show CommonElements, ElementEnvironment;
9 import '../elements/types.dart' show InterfaceType; 9 import '../elements/types.dart' show InterfaceType;
10 import '../elements/entities.dart'; 10 import '../elements/entities.dart';
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 return _asCheck ??= 195 return _asCheck ??=
196 new BackendImpact(staticUses: [_commonElements.throwRuntimeError]); 196 new BackendImpact(staticUses: [_commonElements.throwRuntimeError]);
197 } 197 }
198 198
199 BackendImpact _throwNoSuchMethod; 199 BackendImpact _throwNoSuchMethod;
200 200
201 BackendImpact get throwNoSuchMethod { 201 BackendImpact get throwNoSuchMethod {
202 return _throwNoSuchMethod ??= new BackendImpact( 202 return _throwNoSuchMethod ??= new BackendImpact(
203 instantiatedClasses: _options.useKernel 203 instantiatedClasses: _options.useKernel
204 ? [ 204 ? [
205 _commonElements.symbolClass, 205 _commonElements.symbolImplementationClass,
206 ] 206 ]
207 : [], 207 : [],
208 staticUses: _options.useKernel 208 staticUses: _options.useKernel
209 ? [ 209 ? [
210 _commonElements.genericNoSuchMethod, 210 _commonElements.genericNoSuchMethod,
211 _commonElements.unresolvedConstructorError, 211 _commonElements.unresolvedConstructorError,
212 _commonElements.unresolvedStaticMethodError, 212 _commonElements.unresolvedStaticMethodError,
213 _commonElements.unresolvedStaticGetterError, 213 _commonElements.unresolvedStaticGetterError,
214 _commonElements.unresolvedStaticSetterError, 214 _commonElements.unresolvedStaticSetterError,
215 _commonElements.unresolvedTopLevelMethodError, 215 _commonElements.unresolvedTopLevelMethodError,
216 _commonElements.unresolvedTopLevelGetterError, 216 _commonElements.unresolvedTopLevelGetterError,
217 _commonElements.unresolvedTopLevelSetterError, 217 _commonElements.unresolvedTopLevelSetterError,
218 _commonElements.symbolConstructor, 218 _commonElements.symbolConstructorTarget,
219 ] 219 ]
220 : [ 220 : [
221 _commonElements.throwNoSuchMethod, 221 _commonElements.throwNoSuchMethod,
222 ], 222 ],
223 otherImpacts: [ 223 otherImpacts: [
224 // Also register the types of the arguments passed to this method. 224 // Also register the types of the arguments passed to this method.
225 _needsList( 225 _needsList(
226 'Needed to encode the arguments for throw NoSuchMethodError.'), 226 'Needed to encode the arguments for throw NoSuchMethodError.'),
227 _needsString( 227 _needsString(
228 'Needed to encode the name for throw NoSuchMethodError.'), 228 'Needed to encode the name for throw NoSuchMethodError.'),
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 328
329 BackendImpact get symbolConstructor { 329 BackendImpact get symbolConstructor {
330 return _symbolConstructor ??= new BackendImpact( 330 return _symbolConstructor ??= new BackendImpact(
331 staticUses: [_commonElements.symbolValidatedConstructor]); 331 staticUses: [_commonElements.symbolValidatedConstructor]);
332 } 332 }
333 333
334 BackendImpact _constSymbol; 334 BackendImpact _constSymbol;
335 335
336 BackendImpact get constSymbol { 336 BackendImpact get constSymbol {
337 return _constSymbol ??= new BackendImpact( 337 return _constSymbol ??= new BackendImpact(
338 instantiatedClasses: [_commonElements.symbolClass], 338 instantiatedClasses: [_commonElements.symbolImplementationClass],
339 staticUses: [_commonElements.symbolConstructor]); 339 staticUses: [_commonElements.symbolConstructorTarget]);
340 } 340 }
341 341
342 /// Helper for registering that `int` is needed. 342 /// Helper for registering that `int` is needed.
343 BackendImpact _needsInt(String reason) { 343 BackendImpact _needsInt(String reason) {
344 // TODO(johnniwinther): Register [reason] for use in dump-info. 344 // TODO(johnniwinther): Register [reason] for use in dump-info.
345 return intValues; 345 return intValues;
346 } 346 }
347 347
348 /// Helper for registering that `List` is needed. 348 /// Helper for registering that `List` is needed.
349 BackendImpact _needsList(String reason) { 349 BackendImpact _needsList(String reason) {
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
789 /// Backend impact for type variables through mirrors. 789 /// Backend impact for type variables through mirrors.
790 BackendImpact get typeVariableMirror { 790 BackendImpact get typeVariableMirror {
791 return _typeVariableMirror ??= new BackendImpact(staticUses: [ 791 return _typeVariableMirror ??= new BackendImpact(staticUses: [
792 _commonElements.typeVariableConstructor, 792 _commonElements.typeVariableConstructor,
793 _commonElements.createRuntimeType 793 _commonElements.createRuntimeType
794 ], instantiatedClasses: [ 794 ], instantiatedClasses: [
795 _commonElements.typeVariableClass 795 _commonElements.typeVariableClass
796 ]); 796 ]);
797 } 797 }
798 } 798 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder.dart ('k') | pkg/compiler/lib/src/js_backend/backend_usage.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698