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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/use_field_initializers.dart

Issue 2221893003: pkg/compiler: fix imports (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/update_refinements.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2016, 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 library dart2js.cps_ir.use_field_initializers; 4 library dart2js.cps_ir.use_field_initializers;
5 5
6 import '../elements/elements.dart';
7 import '../js_backend/js_backend.dart';
6 import 'cps_ir_nodes.dart'; 8 import 'cps_ir_nodes.dart';
7 import 'optimizers.dart'; 9 import 'optimizers.dart';
8 import '../elements/elements.dart';
9 import '../js_backend/js_backend.dart';
10 10
11 /// Eliminates [SetField] instructions when the value can instead be passed into 11 /// Eliminates [SetField] instructions when the value can instead be passed into
12 /// the field initializer of a [CreateInstance] instruction. 12 /// the field initializer of a [CreateInstance] instruction.
13 /// 13 ///
14 /// This compensates for a somewhat common pattern where fields are initialized 14 /// This compensates for a somewhat common pattern where fields are initialized
15 /// in the constructor body instead of using initializers. For example: 15 /// in the constructor body instead of using initializers. For example:
16 /// 16 ///
17 /// class Foo { 17 /// class Foo {
18 /// var x, y; 18 /// var x, y;
19 /// Foo(x, y) { 19 /// Foo(x, y) {
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 } 211 }
212 212
213 class EscapeVisitor extends DeepRecursiveVisitor { 213 class EscapeVisitor extends DeepRecursiveVisitor {
214 final UseFieldInitializers main; 214 final UseFieldInitializers main;
215 EscapeVisitor(this.main); 215 EscapeVisitor(this.main);
216 216
217 processReference(Reference ref) { 217 processReference(Reference ref) {
218 main.escape(ref); 218 main.escape(ref);
219 } 219 }
220 } 220 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/update_refinements.dart ('k') | pkg/compiler/lib/src/dart2js.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698