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

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

Issue 1155633002: Fix 56 hints in pkg/compiler (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
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 unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/tree/unparser.dart ('k') | pkg/compiler/lib/src/typechecker.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) 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 tree_ir.optimization.variable_merger; 5 library tree_ir.optimization.variable_merger;
6 6
7 import 'optimization.dart' show Pass; 7 import 'optimization.dart' show Pass;
8 import '../tree_ir_nodes.dart'; 8 import '../tree_ir_nodes.dart';
9 import '../../elements/elements.dart' show Local, ParameterElement;
10 9
11 /// Merges variables based on liveness and source variable information. 10 /// Merges variables based on liveness and source variable information.
12 /// 11 ///
13 /// This phase cleans up artifacts introduced by the translation through CPS, 12 /// This phase cleans up artifacts introduced by the translation through CPS,
14 /// where each source variable is translated into several copies. The copies 13 /// where each source variable is translated into several copies. The copies
15 /// are merged again when they are not live simultaneously. 14 /// are merged again when they are not live simultaneously.
16 class VariableMerger extends RecursiveVisitor implements Pass { 15 class VariableMerger extends RecursiveVisitor implements Pass {
17 String get passName => 'Variable merger'; 16 String get passName => 'Variable merger';
18 17
19 void rewrite(RootNode node) { 18 void rewrite(RootNode node) {
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 // VariableDeclaration is only used for captured variables, which are never 540 // VariableDeclaration is only used for captured variables, which are never
542 // merged, so this is not strictly necessary. But it's nicer if this class 541 // merged, so this is not strictly necessary. But it's nicer if this class
543 // works for arbitrary substitution maps. 542 // works for arbitrary substitution maps.
544 node.variable = replaceWrite(node.variable); 543 node.variable = replaceWrite(node.variable);
545 node.value = visitExpression(node.value); 544 node.value = visitExpression(node.value);
546 node.next = visitStatement(node.next); 545 node.next = visitStatement(node.next);
547 return node; 546 return node;
548 } 547 }
549 548
550 } 549 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree/unparser.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698