Bug 990336 - Backout non-lazy dedup-on-insertion: not actually a speedup; r=jonco

--HG--
extra : rebase_source : 7b505c2c46b8c65c19e5d10b622a76bd8976e9a5
This commit is contained in:
Terrence Cole 2014-04-17 08:14:35 -07:00
parent 0b1b658ce6
commit 30bb9d81ff
2 changed files with 0 additions and 39 deletions

View File

@ -141,12 +141,6 @@ class BumpChunk
return aligned;
}
void *peek(size_t n) {
if (bump - bumpBase() < ptrdiff_t(n))
return nullptr;
return bump - n;
}
static BumpChunk *new_(size_t chunkSize);
static void delete_(BumpChunk *chunk);
};
@ -461,16 +455,6 @@ class LifoAlloc
return Mark(chunk_, position_);
}
};
// Return a modifiable pointer to the most recently allocated bytes. The
// type of the thing must be known, so is only applicable to some special-
// purpose allocators. Will return a nullptr if nothing has been allocated.
template <typename T>
T *peek() {
if (!latest)
return nullptr;
return static_cast<T *>(latest->peek(sizeof(T)));
}
};
class LifoAllocScope

View File

@ -134,10 +134,6 @@ class StoreBuffer
void put(StoreBuffer *owner, const T &t) {
JS_ASSERT(storage_);
T *tip = storage_->peek<T>();
if (tip && tip->canMergeWith(t))
return tip->mergeInplace(t);
T *tp = storage_->new_<T>(t);
if (!tp)
CrashAtUnhandlableOOM("Failed to allocate for MonoTypeBuffer::put.");
@ -251,9 +247,6 @@ class StoreBuffer
return !nursery.isInside(edge) && nursery.isInside(*edge);
}
bool canMergeWith(const CellPtrEdge &other) const { return edge == other.edge; }
void mergeInplace(const CellPtrEdge &) {}
void mark(JSTracer *trc);
CellPtrEdge tagged() const { return CellPtrEdge((Cell **)(uintptr_t(edge) | 1)); }
@ -277,9 +270,6 @@ class StoreBuffer
return !nursery.isInside(edge) && nursery.isInside(deref());
}
bool canMergeWith(const ValueEdge &other) const { return edge == other.edge; }
void mergeInplace(const ValueEdge &) {}
void mark(JSTracer *trc);
ValueEdge tagged() const { return ValueEdge((JS::Value *)(uintptr_t(edge) | 1)); }
@ -321,16 +311,6 @@ class StoreBuffer
return !(*this == other);
}
bool canMergeWith(const SlotsEdge &other) const {
return objectAndKind_ == other.objectAndKind_;
}
void mergeInplace(const SlotsEdge &other) {
int32_t end = Max(start_ + count_, other.start_ + other.count_);
start_ = Min(start_, other.start_);
count_ = end - start_;
}
bool maybeInRememberedSet(const Nursery &nursery) const {
return !nursery.isInside(object());
}
@ -360,9 +340,6 @@ class StoreBuffer
static bool supportsDeduplication() { return true; }
void *deduplicationKey() const { return (void *)edge; }
bool canMergeWith(const WholeCellEdges &other) const { return edge == other.edge; }
void mergeInplace(const WholeCellEdges &) {}
void mark(JSTracer *trc);
typedef PointerEdgeHasher<WholeCellEdges> Hasher;