Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Unified Diff: runtime/vm/flow_graph_compiler.h

Issue 1513883002: Polymorphic calls in precompilation invoke megamorphic calls when tests fail (instead of deoptimizi… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: g Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « runtime/vm/compiler.cc ('k') | runtime/vm/flow_graph_compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698