Index: runtime/vm/flow_graph_optimizer.cc |
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc |
index 3f1baa3d03e5f3f10e1c474b641f6d41c8d9f571..d7fc697d06c344938f2ae09a3f00f296c3161c0f 100644 |
--- a/runtime/vm/flow_graph_optimizer.cc |
+++ b/runtime/vm/flow_graph_optimizer.cc |
@@ -977,7 +977,7 @@ void FlowGraphOptimizer::InlineStringLengthGetter(InstanceCallInstr* call) { |
} |
-void FlowGraphOptimizer::InlineStringIsEmptyTester(InstanceCallInstr* call) { |
+void FlowGraphOptimizer::InlineStringIsEmptyGetter(InstanceCallInstr* call) { |
// Check receiver class. |
AddCheckClass(call, call->ArgumentAt(0)->value()->Copy()); |
@@ -1056,6 +1056,15 @@ bool FlowGraphOptimizer::TryInlineInstanceGetter(InstanceCallInstr* call) { |
return true; |
} |
+ if (recognized_kind == MethodRecognizer::kStringBaseIsEmpty) { |
+ if (!ic_data.HasOneTarget()) { |
+ // Target is not only StringBase_get_isEmpty. |
+ return false; |
+ } |
+ InlineStringIsEmptyGetter(call); |
+ return true; |
+ } |
+ |
return false; |
} |
@@ -1117,15 +1126,6 @@ bool FlowGraphOptimizer::TryInlineInstanceMethod(InstanceCallInstr* call) { |
return true; |
} |
- if (recognized_kind == MethodRecognizer::kStringBaseIsEmpty) { |
- if (!ic_data.HasOneTarget()) { |
- // Target is not only StringBase_get_length. |
- return false; |
- } |
- InlineStringIsEmptyTester(call); |
- return true; |
- } |
- |
return false; |
} |