Index: runtime/vm/flow_graph_compiler.h |
diff --git a/runtime/vm/flow_graph_compiler.h b/runtime/vm/flow_graph_compiler.h |
index 075e239a4b5e005026eb6f890b5a8e550864c06b..b6d4c4c13ae061d5167d0ce4aad177a25a398b51 100644 |
--- a/runtime/vm/flow_graph_compiler.h |
+++ b/runtime/vm/flow_graph_compiler.h |
@@ -214,6 +214,37 @@ class SlowPathCode : public ZoneAllocated { |
}; |
+class MegamorphicSlowPath : public SlowPathCode { |
+ public: |
+ MegamorphicSlowPath(const ICData& ic_data, |
+ intptr_t argument_count, |
+ intptr_t deopt_id, |
+ intptr_t token_pos, |
+ LocationSummary* locs, |
+ intptr_t try_index) |
+ : SlowPathCode(), |
+ ic_data_(ic_data), |
+ argument_count_(argument_count), |
+ deopt_id_(deopt_id), |
+ token_pos_(token_pos), |
+ locs_(locs), |
+ try_index_(try_index) {} |
+ virtual ~MegamorphicSlowPath() {} |
+ |
+ private: |
+ virtual void EmitNativeCode(FlowGraphCompiler* comp); |
+ |
+ const ICData& ic_data_; |
+ intptr_t argument_count_; |
+ intptr_t deopt_id_; |
+ intptr_t token_pos_; |
+ LocationSummary* locs_; |
+ const intptr_t try_index_; // For try/catch ranges. |
+ |
+ DISALLOW_COPY_AND_ASSIGN(MegamorphicSlowPath); |
+}; |
+ |
+ |
struct CidTarget { |
intptr_t cid; |
Function* target; |
@@ -414,11 +445,14 @@ class FlowGraphCompiler : public ValueObject { |
intptr_t token_pos, |
LocationSummary* locs); |
- void EmitMegamorphicInstanceCall(const ICData& ic_data, |
- intptr_t argument_count, |
- intptr_t deopt_id, |
- intptr_t token_pos, |
- LocationSummary* locs); |
+ // Pass a value for try-index where block is not available (e.g. slow path). |
+ void EmitMegamorphicInstanceCall( |
+ const ICData& ic_data, |
+ intptr_t argument_count, |
+ intptr_t deopt_id, |
+ intptr_t token_pos, |
+ LocationSummary* locs, |
+ intptr_t try_index = CatchClauseNode::kInvalidTryIndex); |
void EmitSwitchableInstanceCall(const ICData& ic_data, |
intptr_t argument_count, |