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

Unified Diff: runtime/vm/flow_graph_inliner.cc

Issue 2379733002: Recognize and optimize a.runtimeType == b.runtimeType pattern. (Closed)
Patch Set: Done Created 4 years, 3 months 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
Index: runtime/vm/flow_graph_inliner.cc
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
index b42bba53d3ccab8bd7dc7569574db7ba23ee2b94..701d620eeb7be1e3c6a7bdc09537d598fac8aaca 100644
--- a/runtime/vm/flow_graph_inliner.cc
+++ b/runtime/vm/flow_graph_inliner.cc
@@ -829,7 +829,8 @@ class CallSiteInliner : public ValueObject {
// Deopt-ids overlap between caller and callee.
if (FLAG_precompiled_mode) {
#ifdef DART_PRECOMPILER
- AotOptimizer optimizer(callee_graph,
+ AotOptimizer optimizer(inliner_->precompiler_,
+ callee_graph,
inliner_->use_speculative_inlining_,
inliner_->inlining_black_list_);
optimizer.PopulateWithICData();
@@ -1878,14 +1879,16 @@ FlowGraphInliner::FlowGraphInliner(
GrowableArray<TokenPosition>* inline_id_to_token_pos,
GrowableArray<intptr_t>* caller_inline_id,
bool use_speculative_inlining,
- GrowableArray<intptr_t>* inlining_black_list)
+ GrowableArray<intptr_t>* inlining_black_list,
+ Precompiler* precompiler)
: flow_graph_(flow_graph),
inline_id_to_function_(inline_id_to_function),
inline_id_to_token_pos_(inline_id_to_token_pos),
caller_inline_id_(caller_inline_id),
trace_inlining_(ShouldTraceInlining(flow_graph)),
use_speculative_inlining_(use_speculative_inlining),
- inlining_black_list_(inlining_black_list) {
+ inlining_black_list_(inlining_black_list),
+ precompiler_(precompiler) {
ASSERT(!use_speculative_inlining || (inlining_black_list != NULL));
}

Powered by Google App Engine
This is Rietveld 408576698