| Index: runtime/vm/flow_graph_inliner.cc
|
| diff --git a/runtime/vm/flow_graph_inliner.cc b/runtime/vm/flow_graph_inliner.cc
|
| index f93b1d18e5ea752ea895ca86c4b4bb45a92265a0..994e13e9be089587db16bf6138847e1b723e1329 100644
|
| --- a/runtime/vm/flow_graph_inliner.cc
|
| +++ b/runtime/vm/flow_graph_inliner.cc
|
| @@ -2460,6 +2460,29 @@ static bool InlineDoubleOp(FlowGraph* flow_graph,
|
| }
|
|
|
|
|
| +static bool InlineSmiBitAndFromSmi(FlowGraph* flow_graph,
|
| + Instruction* call,
|
| + TargetEntryInstr** entry,
|
| + Definition** last) {
|
| + Definition* left = call->ArgumentAt(0);
|
| + Definition* right = call->ArgumentAt(1);
|
| +
|
| + *entry = new(Z) TargetEntryInstr(flow_graph->allocate_block_id(),
|
| + call->GetBlock()->try_index());
|
| + (*entry)->InheritDeoptTarget(Z, call);
|
| + // Right arguments is known to be smi: other._bitAndFromSmi(this);
|
| + BinarySmiOpInstr* smi_op =
|
| + new(Z) BinarySmiOpInstr(Token::kBIT_AND,
|
| + new(Z) Value(left),
|
| + new(Z) Value(right),
|
| + call->deopt_id());
|
| + flow_graph->AppendTo(*entry, smi_op, call->env(), FlowGraph::kValue);
|
| + *last = smi_op;
|
| +
|
| + return true;
|
| +}
|
| +
|
| +
|
| static bool InlineGrowableArraySetter(FlowGraph* flow_graph,
|
| intptr_t offset,
|
| StoreBarrierType store_barrier_type,
|
| @@ -3227,6 +3250,8 @@ bool FlowGraphInliner::TryInlineRecognizedMethod(FlowGraph* flow_graph,
|
| return InlineGrowableArraySetter(
|
| flow_graph, GrowableObjectArray::length_offset(), kNoStoreBarrier,
|
| call, entry, last);
|
| + case MethodRecognizer::kSmi_bitAndFromSmi:
|
| + return InlineSmiBitAndFromSmi(flow_graph, call, entry, last);
|
| default:
|
| return false;
|
| }
|
|
|