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

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

Issue 2707933002: Tests for `void`.
Patch Set: More tests. 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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 606
607 BackendImpact get mapLiteralClass { 607 BackendImpact get mapLiteralClass {
608 return _mapLiteralClass ??= new BackendImpact(globalUses: [ 608 return _mapLiteralClass ??= new BackendImpact(globalUses: [
609 helpers.mapLiteralConstructor, 609 helpers.mapLiteralConstructor,
610 helpers.mapLiteralConstructorEmpty, 610 helpers.mapLiteralConstructorEmpty,
611 helpers.mapLiteralUntypedMaker, 611 helpers.mapLiteralUntypedMaker,
612 helpers.mapLiteralUntypedEmptyMaker 612 helpers.mapLiteralUntypedEmptyMaker
613 ]); 613 ]);
614 } 614 }
615 615
616 BackendImpact _objectClass;
617
618 // TODO(floitsch): this should probably be a `void` impact, and not on
619 // `Object`.
620 BackendImpact get objectClass {
621 return _objectClass ??=
622 new BackendImpact(globalClasses: [helpers.voidClass]);
623 }
624
616 BackendImpact _closureClass; 625 BackendImpact _closureClass;
617 626
618 BackendImpact get closureClass { 627 BackendImpact get closureClass {
619 return _closureClass ??= 628 return _closureClass ??=
620 new BackendImpact(globalUses: [helpers.closureFromTearOff]); 629 new BackendImpact(globalUses: [helpers.closureFromTearOff]);
621 } 630 }
622 631
623 BackendImpact _listClasses; 632 BackendImpact _listClasses;
624 633
625 BackendImpact get listClasses { 634 BackendImpact get listClasses {
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 737
729 BackendImpact _staticClosure; 738 BackendImpact _staticClosure;
730 739
731 /// Backend impact for performing closurization of a top-level or static 740 /// Backend impact for performing closurization of a top-level or static
732 /// function. 741 /// function.
733 BackendImpact get staticClosure { 742 BackendImpact get staticClosure {
734 return _staticClosure ??= 743 return _staticClosure ??=
735 new BackendImpact(globalClasses: [helpers.closureClass]); 744 new BackendImpact(globalClasses: [helpers.closureClass]);
736 } 745 }
737 } 746 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698