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

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

Issue 1386343003: Revert "dart2js cps: Maintain parent pointers instead of recomputing them." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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.cps_ir.mutable_ssa; 5 library dart2js.cps_ir.mutable_ssa;
6 6
7 import 'cps_ir_nodes.dart'; 7 import 'cps_ir_nodes.dart';
8 import 'optimizers.dart'; 8 import 'optimizers.dart';
9 9
10 /// Determines which mutable variables should be rewritten to phi assignments 10 /// Determines which mutable variables should be rewritten to phi assignments
11 /// in this pass. 11 /// in this pass.
12 /// 12 ///
13 /// We do not rewrite variables that have an assignment inside a try block that 13 /// We do not rewrite variables that have an assignment inside a try block that
14 /// does not contain its declaration. 14 /// does not contain its declaration.
15 class MutableVariablePreanalysis extends TrampolineRecursiveVisitor { 15 class MutableVariablePreanalysis extends RecursiveVisitor {
16 // Number of try blocks enclosing the current position. 16 // Number of try blocks enclosing the current position.
17 int currentDepth = 0; 17 int currentDepth = 0;
18 18
19 /// Number of try blocks enclosing the declaration of a given mutable 19 /// Number of try blocks enclosing the declaration of a given mutable
20 /// variable. 20 /// variable.
21 /// 21 ///
22 /// All mutable variables seen will be present in the map after the analysis. 22 /// All mutable variables seen will be present in the map after the analysis.
23 Map<MutableVariable, int> variableDepth = <MutableVariable, int>{}; 23 Map<MutableVariable, int> variableDepth = <MutableVariable, int>{};
24 24
25 /// Variables with an assignment inside a try block that does not contain 25 /// Variables with an assignment inside a try block that does not contain
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 class VariableItem extends StackItem {} 242 class VariableItem extends StackItem {}
243 243
244 /// Represents a yet unprocessed continuation together with the 244 /// Represents a yet unprocessed continuation together with the
245 /// environment in which to process it. 245 /// environment in which to process it.
246 class ContinuationItem extends StackItem { 246 class ContinuationItem extends StackItem {
247 final Continuation continuation; 247 final Continuation continuation;
248 final Map<MutableVariable, Primitive> environment; 248 final Map<MutableVariable, Primitive> environment;
249 249
250 ContinuationItem(this.continuation, this.environment); 250 ContinuationItem(this.continuation, this.environment);
251 } 251 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/insert_refinements.dart ('k') | pkg/compiler/lib/src/cps_ir/optimizers.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698