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

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

Issue 2329403003: More features handled in kernel impact. (Closed)
Patch Set: Fix analyze_test_test. Created 4 years, 3 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 '../compiler.dart' show Compiler; 7 import '../compiler.dart' show Compiler;
8 import '../core_types.dart' show CommonElements; 8 import '../core_types.dart' show CommonElements;
9 import '../dart_types.dart' show InterfaceType; 9 import '../dart_types.dart' show InterfaceType;
10 import '../elements/elements.dart' show ClassElement, Element; 10 import '../elements/elements.dart' show ClassElement, Element;
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 299
300 BackendImpact get constSymbol { 300 BackendImpact get constSymbol {
301 if (_constSymbol == null) { 301 if (_constSymbol == null) {
302 _constSymbol = new BackendImpact( 302 _constSymbol = new BackendImpact(
303 instantiatedClasses: [commonElements.symbolClass], 303 instantiatedClasses: [commonElements.symbolClass],
304 staticUses: [commonElements.symbolConstructor.declaration]); 304 staticUses: [commonElements.symbolConstructor.declaration]);
305 } 305 }
306 return _constSymbol; 306 return _constSymbol;
307 } 307 }
308 308
309 BackendImpact _incDecOperation;
310
311 BackendImpact get incDecOperation {
312 if (_incDecOperation == null) {
313 _incDecOperation =
314 _needsInt('Needed for the `+ 1` or `- 1` operation of ++/--.');
315 }
316 return _incDecOperation;
317 }
318
319 /// Helper for registering that `int` is needed. 309 /// Helper for registering that `int` is needed.
320 BackendImpact _needsInt(String reason) { 310 BackendImpact _needsInt(String reason) {
321 // TODO(johnniwinther): Register [reason] for use in dump-info. 311 // TODO(johnniwinther): Register [reason] for use in dump-info.
322 return intValues; 312 return intValues;
323 } 313 }
324 314
325 /// Helper for registering that `List` is needed. 315 /// Helper for registering that `List` is needed.
326 BackendImpact _needsList(String reason) { 316 BackendImpact _needsList(String reason) {
327 // TODO(johnniwinther): Register [reason] for use in dump-info. 317 // TODO(johnniwinther): Register [reason] for use in dump-info.
328 return listValues; 318 return listValues;
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
597 BackendImpact _closure; 587 BackendImpact _closure;
598 588
599 BackendImpact get closure { 589 BackendImpact get closure {
600 if (_closure == null) { 590 if (_closure == null) {
601 _closure = new BackendImpact( 591 _closure = new BackendImpact(
602 instantiatedClasses: [commonElements.functionClass]); 592 instantiatedClasses: [commonElements.functionClass]);
603 } 593 }
604 return _closure; 594 return _closure;
605 } 595 }
606 } 596 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/kernel/kernel_debug.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698