Index: runtime/vm/flow_graph_inliner.cc |
diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc |
index 930da8dd41c235c664bacb15c141b9c091d91138..950a15d70196f16770eb0f9bd881bd48df6b6e67 100644 |
--- a/runtime/vm/flow_graph_inliner.cc |
+++ b/runtime/vm/flow_graph_inliner.cc |
@@ -614,6 +614,9 @@ class CallSiteInliner : public ValueObject { |
bool TryInlining(const Function& function, |
const Array& argument_names, |
InlinedCallData* call_data) { |
+ if (function.is_native()) { |
+ return false; |
+ } |
TRACE_INLINING(THR_Print(" => %s (deopt count %d)\n", |
function.ToCString(), |
function.deoptimization_counter())); |
@@ -1385,6 +1388,9 @@ bool PolymorphicInliner::CheckNonInlinedDuplicate(const Function& target) { |
bool PolymorphicInliner::TryInliningPoly(intptr_t receiver_cid, |
const Function& target) { |
+ if (target.is_native()) { |
+ return false; |
+ } |
if (TryInlineRecognizedMethod(receiver_cid, target)) { |
owner_->inlined_ = true; |
return true; |