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

Unified Diff: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart

Issue 1136843006: dart2js cps: Access to lazily initialized fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« 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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
index 5b5f16864322b713cdc886a056a105510e47bf00..8d5c2fbe49f6e1f1d18074e5001c921254f5b5e7 100644
--- a/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
+++ b/pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart
@@ -667,6 +667,13 @@ class Builder implements cps_ir.Visitor<Node> {
return new GetStatic(node.element, node.sourceInformation);
}
+ Statement visitGetLazyStatic(cps_ir.GetLazyStatic node) {
+ // In the tree IR, GetStatic handles lazy fields because tree
+ // expressions are allowed to have side effects.
+ GetStatic value = new GetStatic(node.element, node.sourceInformation);
+ return continueWithExpression(node.continuation, value);
+ }
+
Statement visitSetStatic(cps_ir.SetStatic node) {
SetStatic setStatic = new SetStatic(
node.element,
« 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