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

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

Issue 2608143002: Refactor BackendHelpers to make 'find' methods private. (Closed)
Patch Set: Updated cf. comments. Created 3 years, 11 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 '../dart_types.dart' show InterfaceType; 10 import '../dart_types.dart' show InterfaceType;
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 ], otherImpacts: [ 262 ], otherImpacts: [
263 _needsInt('Needed to encode the invocation kind of super.noSuchMethod.'), 263 _needsInt('Needed to encode the invocation kind of super.noSuchMethod.'),
264 _needsList('Needed to encode the arguments of super.noSuchMethod.'), 264 _needsList('Needed to encode the arguments of super.noSuchMethod.'),
265 _needsString('Needed to encode the name of super.noSuchMethod.') 265 _needsString('Needed to encode the name of super.noSuchMethod.')
266 ]); 266 ]);
267 } 267 }
268 268
269 BackendImpact _constantMapLiteral; 269 BackendImpact _constantMapLiteral;
270 270
271 BackendImpact get constantMapLiteral { 271 BackendImpact get constantMapLiteral {
272 if (_constantMapLiteral == null) { 272 return _constantMapLiteral ??= new BackendImpact(instantiatedClasses: [
273 ClassElement find(String name) { 273 helpers.constantMapClass,
274 return helpers.find(helpers.jsHelperLibrary, name); 274 helpers.constantProtoMapClass,
275 } 275 helpers.constantStringMapClass,
276 276 helpers.generalConstantMapClass,
277 _constantMapLiteral = new BackendImpact(instantiatedClasses: [ 277 ]);
278 find(JavaScriptMapConstant.DART_CLASS),
279 find(JavaScriptMapConstant.DART_PROTO_CLASS),
280 find(JavaScriptMapConstant.DART_STRING_CLASS),
281 find(JavaScriptMapConstant.DART_GENERAL_CLASS)
282 ]);
283 }
284 return _constantMapLiteral;
285 } 278 }
286 279
287 BackendImpact _symbolConstructor; 280 BackendImpact _symbolConstructor;
288 281
289 BackendImpact get symbolConstructor { 282 BackendImpact get symbolConstructor {
290 return _symbolConstructor ??= 283 return _symbolConstructor ??=
291 new BackendImpact(staticUses: [helpers.symbolValidatedConstructor]); 284 new BackendImpact(staticUses: [helpers.symbolValidatedConstructor]);
292 } 285 }
293 286
294 BackendImpact _constSymbol; 287 BackendImpact _constSymbol;
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
730 723
731 BackendImpact _staticClosure; 724 BackendImpact _staticClosure;
732 725
733 /// Backend impact for performing closurization of a top-level or static 726 /// Backend impact for performing closurization of a top-level or static
734 /// function. 727 /// function.
735 BackendImpact get staticClosure { 728 BackendImpact get staticClosure {
736 return _staticClosure ??= 729 return _staticClosure ??=
737 new BackendImpact(globalClasses: [helpers.closureClass]); 730 new BackendImpact(globalClasses: [helpers.closureClass]);
738 } 731 }
739 } 732 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend_helpers.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