OLD | NEW |
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 cps_ir.parent_visitor; | 5 library cps_ir.parent_visitor; |
6 | 6 |
7 import 'cps_ir_nodes.dart'; | 7 import 'cps_ir_nodes.dart'; |
8 | 8 |
9 /// Traverses the CPS term and sets node.parent for each visited node. | 9 /// Traverses the CPS term and sets node.parent for each visited node. |
10 class ParentVisitor extends DeepRecursiveVisitor { | 10 class ParentVisitor extends DeepRecursiveVisitor { |
(...skipping 22 matching lines...) Expand all Loading... |
33 assert(_parent != node); | 33 assert(_parent != node); |
34 assert(_parent != null); | 34 assert(_parent != null); |
35 node.parent = _parent; | 35 node.parent = _parent; |
36 } | 36 } |
37 | 37 |
38 @override | 38 @override |
39 processReference(Reference node) { | 39 processReference(Reference node) { |
40 node.parent = _parent; | 40 node.parent = _parent; |
41 } | 41 } |
42 } | 42 } |
43 | |
OLD | NEW |