| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #ifndef VM_FLOW_GRAPH_INLINER_H_ | 5 #ifndef VM_FLOW_GRAPH_INLINER_H_ |
| 6 #define VM_FLOW_GRAPH_INLINER_H_ | 6 #define VM_FLOW_GRAPH_INLINER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 | 9 |
| 10 namespace dart { | 10 namespace dart { |
| 11 | 11 |
| 12 class Field; | 12 class Field; |
| 13 class FlowGraph; | 13 class FlowGraph; |
| 14 template <typename T> class GrowableArray; | 14 template <typename T> class GrowableArray; |
| 15 | 15 |
| 16 class FlowGraphInliner : ValueObject { | 16 class FlowGraphInliner : ValueObject { |
| 17 public: | 17 public: |
| 18 FlowGraphInliner(FlowGraph* flow_graph, | 18 explicit FlowGraphInliner(FlowGraph* flow_graph) : flow_graph_(flow_graph) { } |
| 19 GrowableArray<const Field*>* guarded_fields) | |
| 20 : flow_graph_(flow_graph), guarded_fields_(guarded_fields) {} | |
| 21 | 19 |
| 22 // The flow graph is destructively updated upon inlining. | 20 // The flow graph is destructively updated upon inlining. |
| 23 void Inline(); | 21 void Inline(); |
| 24 | 22 |
| 25 static void CollectGraphInfo(FlowGraph* flow_graph); | 23 static void CollectGraphInfo(FlowGraph* flow_graph); |
| 26 | 24 |
| 27 private: | 25 private: |
| 28 FlowGraph* flow_graph_; | 26 FlowGraph* flow_graph_; |
| 29 GrowableArray<const Field*>* guarded_fields_; | |
| 30 | 27 |
| 31 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner); | 28 DISALLOW_COPY_AND_ASSIGN(FlowGraphInliner); |
| 32 }; | 29 }; |
| 33 | 30 |
| 34 } // namespace dart | 31 } // namespace dart |
| 35 | 32 |
| 36 #endif // VM_FLOW_GRAPH_INLINER_H_ | 33 #endif // VM_FLOW_GRAPH_INLINER_H_ |
| OLD | NEW |