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

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

Issue 2653203002: Use entities in CommonElements interface. (Closed)
Patch Set: Created 3 years, 10 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 '../compiler.dart' show Compiler; 8 import '../compiler.dart' show Compiler;
9 import '../core_types.dart' show CommonElements; 9 import '../core_types.dart' show CommonElements;
10 import '../elements/resolution_types.dart' show ResolutionInterfaceType; 10 import '../elements/resolution_types.dart' show ResolutionInterfaceType;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 staticUses: compiler.options.useKernel 169 staticUses: compiler.options.useKernel
170 ? [ 170 ? [
171 helpers.genericNoSuchMethod, 171 helpers.genericNoSuchMethod,
172 helpers.unresolvedConstructorError, 172 helpers.unresolvedConstructorError,
173 helpers.unresolvedStaticMethodError, 173 helpers.unresolvedStaticMethodError,
174 helpers.unresolvedStaticGetterError, 174 helpers.unresolvedStaticGetterError,
175 helpers.unresolvedStaticSetterError, 175 helpers.unresolvedStaticSetterError,
176 helpers.unresolvedTopLevelMethodError, 176 helpers.unresolvedTopLevelMethodError,
177 helpers.unresolvedTopLevelGetterError, 177 helpers.unresolvedTopLevelGetterError,
178 helpers.unresolvedTopLevelSetterError, 178 helpers.unresolvedTopLevelSetterError,
179 commonElements.symbolConstructor.declaration, 179 commonElements.symbolConstructor,
180 ] 180 ]
181 : [ 181 : [
182 helpers.throwNoSuchMethod, 182 helpers.throwNoSuchMethod,
183 ], 183 ],
184 otherImpacts: [ 184 otherImpacts: [
185 // Also register the types of the arguments passed to this method. 185 // Also register the types of the arguments passed to this method.
186 _needsList( 186 _needsList(
187 'Needed to encode the arguments for throw NoSuchMethodError.'), 187 'Needed to encode the arguments for throw NoSuchMethodError.'),
188 _needsString('Needed to encode the name for throw NoSuchMethodError.') 188 _needsString('Needed to encode the name for throw NoSuchMethodError.')
189 ]); 189 ]);
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 BackendImpact get symbolConstructor { 288 BackendImpact get symbolConstructor {
289 return _symbolConstructor ??= 289 return _symbolConstructor ??=
290 new BackendImpact(staticUses: [helpers.symbolValidatedConstructor]); 290 new BackendImpact(staticUses: [helpers.symbolValidatedConstructor]);
291 } 291 }
292 292
293 BackendImpact _constSymbol; 293 BackendImpact _constSymbol;
294 294
295 BackendImpact get constSymbol { 295 BackendImpact get constSymbol {
296 return _constSymbol ??= new BackendImpact( 296 return _constSymbol ??= new BackendImpact(
297 instantiatedClasses: [commonElements.symbolClass], 297 instantiatedClasses: [commonElements.symbolClass],
298 staticUses: [commonElements.symbolConstructor.declaration]); 298 staticUses: [commonElements.symbolConstructor]);
299 } 299 }
300 300
301 /// Helper for registering that `int` is needed. 301 /// Helper for registering that `int` is needed.
302 BackendImpact _needsInt(String reason) { 302 BackendImpact _needsInt(String reason) {
303 // TODO(johnniwinther): Register [reason] for use in dump-info. 303 // TODO(johnniwinther): Register [reason] for use in dump-info.
304 return intValues; 304 return intValues;
305 } 305 }
306 306
307 /// Helper for registering that `List` is needed. 307 /// Helper for registering that `List` is needed.
308 BackendImpact _needsList(String reason) { 308 BackendImpact _needsList(String reason) {
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 729
730 BackendImpact _staticClosure; 730 BackendImpact _staticClosure;
731 731
732 /// Backend impact for performing closurization of a top-level or static 732 /// Backend impact for performing closurization of a top-level or static
733 /// function. 733 /// function.
734 BackendImpact get staticClosure { 734 BackendImpact get staticClosure {
735 return _staticClosure ??= 735 return _staticClosure ??=
736 new BackendImpact(globalClasses: [helpers.closureClass]); 736 new BackendImpact(globalClasses: [helpers.closureClass]);
737 } 737 }
738 } 738 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend_helpers.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698