Chromium Code Reviews| Index: runtime/vm/flow_graph_builder.h |
| diff --git a/runtime/vm/flow_graph_builder.h b/runtime/vm/flow_graph_builder.h |
| index e3d2acfee53ba72dab05955bce81e3705250bdc8..0a3454b2ae48127c6dd320364708d8c0b1b0b9a3 100644 |
| --- a/runtime/vm/flow_graph_builder.h |
| +++ b/runtime/vm/flow_graph_builder.h |
| @@ -103,7 +103,8 @@ class FlowGraphBuilder: public ValueObject { |
| // The inlining context is NULL if not inlining. |
| FlowGraphBuilder(ParsedFunction* parsed_function, |
| const Array& ic_data_array, |
| - InlineExitCollector* exit_collector); |
| + InlineExitCollector* exit_collector, |
| + intptr_t osr_id); |
| FlowGraph* BuildGraph(); |
| @@ -143,6 +144,10 @@ class FlowGraphBuilder: public ValueObject { |
| intptr_t args_pushed() const { return args_pushed_; } |
| void add_args_pushed(intptr_t n) { args_pushed_ += n; } |
| + // When compiling for OSR, remove blocks that are not reachable from the |
| + // OSR entry point. |
| + void PruneUnreachable(); |
| + |
| private: |
| intptr_t parameter_count() const { |
| return num_copied_params_ + num_non_copied_params_; |
| @@ -168,6 +173,10 @@ class FlowGraphBuilder: public ValueObject { |
| // Outgoing argument stack height. |
| intptr_t args_pushed_; |
| + // The deopt id of the OSR entry or Isolate::kNoDeoptId if not compiling |
|
srdjan
2013/06/11 17:12:02
Add this comment also to the constructor.
Kevin Millikin (Google)
2013/06/14 10:10:42
Done.
|
| + // for OSR. |
| + intptr_t osr_id_; |
|
srdjan
2013/06/11 17:12:02
const?
Kevin Millikin (Google)
2013/06/14 10:10:42
Done.
|
| + |
| DISALLOW_IMPLICIT_CONSTRUCTORS(FlowGraphBuilder); |
| }; |
| @@ -229,7 +238,8 @@ class EffectGraphVisitor : public AstNodeVisitor { |
| // Append a 'while loop' test and back edge to this graph, depending on |
| // which parts are reachable. Afterward, the graph exit is the false |
| // successor of the loop condition. |
| - void TieLoop(const TestGraphVisitor& test_fragment, |
| + void TieLoop(intptr_t token_pos, |
| + const TestGraphVisitor& test_fragment, |
| const EffectGraphVisitor& body_fragment); |
| // Wraps a value in a push-argument instruction and adds the result to the |