Commit 8ad1778b authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Make list constructor usable without list-inl.h header.

R=bmeurer@chromium.org

Review URL: https://codereview.chromium.org/1289553002

Cr-Commit-Position: refs/heads/master@{#30126}
parent 00a07bc1
......@@ -15,10 +15,6 @@
#include "src/d8.h"
#ifndef V8_SHARED
#include "src/list-inl.h"
#endif
#if !V8_OS_NACL
#include <sys/select.h>
#endif
......
......@@ -245,15 +245,6 @@ void List<T, P>::StableSort() {
}
template <typename T, class P>
void List<T, P>::Initialize(int capacity, P allocator) {
DCHECK(capacity >= 0);
data_ = (capacity > 0) ? NewData(capacity, allocator) : NULL;
capacity_ = capacity;
length_ = 0;
}
template <typename T, typename P>
int SortedListBSearch(const List<T>& list, P cmp) {
int low = 0;
......
......@@ -166,7 +166,12 @@ class List {
void StableSort();
INLINE(void Initialize(int capacity,
AllocationPolicy allocator = AllocationPolicy()));
AllocationPolicy allocator = AllocationPolicy())) {
DCHECK(capacity >= 0);
data_ = (capacity > 0) ? NewData(capacity, allocator) : NULL;
capacity_ = capacity;
length_ = 0;
}
private:
T* data_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment