| Index: runtime/vm/flow_graph_compiler.cc
|
| diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc
|
| index 3fbeb86ece5f866050f9c32d51969abdfe0c183b..398f0566059acee97d253a48616154b2f6994454 100644
|
| --- a/runtime/vm/flow_graph_compiler.cc
|
| +++ b/runtime/vm/flow_graph_compiler.cc
|
| @@ -1634,56 +1634,6 @@ ParallelMoveResolver::ScratchRegisterScope::~ScratchRegisterScope() {
|
| }
|
|
|
|
|
| -template <typename T>
|
| -static int HighestCountFirst(const T* a, const T* b) {
|
| - // Negative if 'a' should sort before 'b'.
|
| - return b->count - a->count;
|
| -}
|
| -
|
| -
|
| -static int LowestCidFirst(const CidRangeTarget* a, const CidRangeTarget* b) {
|
| - // Negative if 'a' should sort before 'b'.
|
| - return a->cid_start - b->cid_start;
|
| -}
|
| -
|
| -
|
| -// Returns 'sorted' array in decreasing count order.
|
| -// The expected number of elements to sort is less than 10.
|
| -void FlowGraphCompiler::SortICDataByCount(
|
| - const ICData& ic_data,
|
| - GrowableArray<CidRangeTarget>* sorted_arg,
|
| - bool drop_smi) {
|
| - GrowableArray<CidRangeTarget>& sorted = *sorted_arg;
|
| - ASSERT(ic_data.NumArgsTested() == 1);
|
| - const intptr_t len = ic_data.NumberOfChecks();
|
| - sorted.Clear();
|
| -
|
| - for (int i = 0; i < len; i++) {
|
| - intptr_t receiver_cid = ic_data.GetReceiverClassIdAt(i);
|
| - if (drop_smi && (receiver_cid == kSmiCid)) continue;
|
| - Function& target = Function::ZoneHandle(ic_data.GetTargetAt(i));
|
| - sorted.Add(CidRangeTarget(receiver_cid, receiver_cid, &target,
|
| - ic_data.GetCountAt(i)));
|
| - }
|
| - sorted.Sort(LowestCidFirst);
|
| - int dest = 0;
|
| -
|
| - // Merge adjacent ranges.
|
| - for (int src = 0; src < sorted.length(); src++) {
|
| - if (src > 0 && sorted[src - 1].cid_end + 1 == sorted[src].cid_start &&
|
| - sorted[src - 1].target->raw() == sorted[src].target->raw()) {
|
| - sorted[dest - 1].cid_end++;
|
| - sorted[dest - 1].count += sorted[dest].count;
|
| - } else {
|
| - sorted[dest++] = sorted[src];
|
| - }
|
| - }
|
| -
|
| - sorted.SetLength(dest);
|
| - sorted.Sort(HighestCountFirst);
|
| -}
|
| -
|
| -
|
| const ICData* FlowGraphCompiler::GetOrAddInstanceCallICData(
|
| intptr_t deopt_id,
|
| const String& target_name,
|
|
|