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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 1521553003: dart2js cps: Replace GetLazyStatic with GetStatic. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove obsolete comment Created 5 years 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 tree_ir_builder; 5 library tree_ir_builder;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../constants/values.dart'; 8 import '../constants/values.dart';
9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir; 9 import '../cps_ir/cps_ir_nodes.dart' as cps_ir;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 visitNullCheck(cps_ir.NullCheck node) => (Statement next) { 657 visitNullCheck(cps_ir.NullCheck node) => (Statement next) {
658 return new NullCheck( 658 return new NullCheck(
659 condition: getVariableUseOrNull(node.condition), 659 condition: getVariableUseOrNull(node.condition),
660 value: getVariableUse(node.value), 660 value: getVariableUse(node.value),
661 selector: node.selector, 661 selector: node.selector,
662 next: next, 662 next: next,
663 sourceInformation: node.sourceInformation); 663 sourceInformation: node.sourceInformation);
664 }; 664 };
665 665
666 Expression visitGetLazyStatic(cps_ir.GetLazyStatic node) { 666 Expression visitGetLazyStatic(cps_ir.GetLazyStatic node) {
667 // In the tree IR, GetStatic handles lazy fields because we do not need 667 return new GetStatic.lazy(node.element, node.sourceInformation);
668 // as fine-grained control over side effects.
669 return new GetStatic(node.element, node.sourceInformation);
670 } 668 }
671 669
672 @override 670 @override
673 NodeCallback visitYield(cps_ir.Yield node) { 671 NodeCallback visitYield(cps_ir.Yield node) {
674 return (Statement next) { 672 return (Statement next) {
675 return new Yield(getVariableUse(node.input), node.hasStar, next); 673 return new Yield(getVariableUse(node.input), node.hasStar, next);
676 }; 674 };
677 } 675 }
678 676
679 @override 677 @override
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 --enclosingFunctions; 720 --enclosingFunctions;
723 } 721 }
724 722
725 @override 723 @override
726 visitInterpolatedNode(js.InterpolatedNode node) { 724 visitInterpolatedNode(js.InterpolatedNode node) {
727 if (enclosingFunctions > 0) { 725 if (enclosingFunctions > 0) {
728 found = true; 726 found = true;
729 } 727 }
730 } 728 }
731 } 729 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/task.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698