| Index: src/small-pointer-list.h
|
| diff --git a/src/small-pointer-list.h b/src/small-pointer-list.h
|
| index 6c5ce890d2cb64fe8c437bf99c96efb144786357..75fea061ad74b4209271e2d7982baa75f100d705 100644
|
| --- a/src/small-pointer-list.h
|
| +++ b/src/small-pointer-list.h
|
| @@ -69,6 +69,12 @@ class SmallPointerList {
|
| data_ = kEmptyTag;
|
| }
|
|
|
| + void Sort() {
|
| + if ((data_ & kTagMask) == kListTag) {
|
| + list()->Sort(compare_value);
|
| + }
|
| + }
|
| +
|
| bool is_empty() const { return length() == 0; }
|
|
|
| int length() const {
|
| @@ -159,6 +165,10 @@ class SmallPointerList {
|
| private:
|
| typedef ZoneList<T*> PointerList;
|
|
|
| + static int compare_value(T* const* a, T* const* b) {
|
| + return Compare<T>(**a, **b);
|
| + }
|
| +
|
| static const intptr_t kEmptyTag = 1;
|
| static const intptr_t kSingletonTag = 0;
|
| static const intptr_t kListTag = 2;
|
|
|