| Index: runtime/vm/flow_graph.cc
|
| diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
|
| index be7d71e828a98a9a51ab70baca0380bc1c4853f7..e923a837c7ba37b3835724d4f3e354b3751d7123 100644
|
| --- a/runtime/vm/flow_graph.cc
|
| +++ b/runtime/vm/flow_graph.cc
|
| @@ -920,4 +920,18 @@ void FlowGraph::InlineCall(Definition* call, FlowGraph* callee_graph) {
|
| }
|
|
|
|
|
| +intptr_t FlowGraph::InstructionCount() const {
|
| + intptr_t size = 0;
|
| + // Iterate each block, skipping the graph entry.
|
| + for (intptr_t i = 1; i < preorder_.length(); ++i) {
|
| + for (ForwardInstructionIterator it(preorder_[i]);
|
| + !it.Done();
|
| + it.Advance()) {
|
| + ++size;
|
| + }
|
| + }
|
| + return size;
|
| +}
|
| +
|
| +
|
| } // namespace dart
|
|
|