mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 849068 - Fix some build warnings in the StoreBuffer; r=billm
--HG-- extra : rebase_source : 3907302df2bd102314c9112055b1c6ee8f63ffd1
This commit is contained in:
parent
ca84939aa6
commit
935ca4c1e5
@ -13,8 +13,49 @@
|
||||
#include "gc/StoreBuffer.h"
|
||||
#include "vm/ObjectImpl-inl.h"
|
||||
|
||||
using namespace js;
|
||||
using namespace js::gc;
|
||||
|
||||
/*** SlotEdge ***/
|
||||
|
||||
JS_ALWAYS_INLINE HeapSlot *
|
||||
StoreBuffer::SlotEdge::slotLocation() const
|
||||
{
|
||||
if (kind == HeapSlot::Element) {
|
||||
if (offset >= object->getDenseInitializedLength())
|
||||
return NULL;
|
||||
return (HeapSlot *)&object->getDenseElement(offset);
|
||||
}
|
||||
if (offset >= object->slotSpan())
|
||||
return NULL;
|
||||
return &object->getSlotRef(offset);
|
||||
}
|
||||
|
||||
JS_ALWAYS_INLINE void *
|
||||
StoreBuffer::SlotEdge::deref() const
|
||||
{
|
||||
HeapSlot *loc = slotLocation();
|
||||
return (loc && loc->isGCThing()) ? loc->toGCThing() : NULL;
|
||||
}
|
||||
|
||||
JS_ALWAYS_INLINE void *
|
||||
StoreBuffer::SlotEdge::location() const
|
||||
{
|
||||
return (void *)slotLocation();
|
||||
}
|
||||
|
||||
JS_ALWAYS_INLINE bool
|
||||
StoreBuffer::SlotEdge::inRememberedSet(Nursery *n) const
|
||||
{
|
||||
return !n->isInside(object) && n->isInside(deref());
|
||||
}
|
||||
|
||||
JS_ALWAYS_INLINE bool
|
||||
StoreBuffer::SlotEdge::isNullEdge() const
|
||||
{
|
||||
return !deref();
|
||||
}
|
||||
|
||||
/*** MonoTypeBuffer ***/
|
||||
|
||||
template <typename T>
|
||||
|
@ -302,33 +302,15 @@ class StoreBuffer
|
||||
return object != other.object || offset != other.offset || kind != other.kind;
|
||||
}
|
||||
|
||||
HeapSlot *slotLocation() const {
|
||||
if (kind == HeapSlot::Element) {
|
||||
if (offset >= object->getDenseInitializedLength())
|
||||
return NULL;
|
||||
return (HeapSlot *)&object->getDenseElement(offset);
|
||||
}
|
||||
if (offset >= object->slotSpan())
|
||||
return NULL;
|
||||
return &object->getSlotRef(offset);
|
||||
}
|
||||
JS_ALWAYS_INLINE HeapSlot *slotLocation() const;
|
||||
|
||||
void *deref() const {
|
||||
HeapSlot *loc = slotLocation();
|
||||
return (loc && loc->isGCThing()) ? loc->toGCThing() : NULL;
|
||||
}
|
||||
JS_ALWAYS_INLINE void *deref() const;
|
||||
|
||||
void *location() const {
|
||||
return (void *)slotLocation();
|
||||
}
|
||||
JS_ALWAYS_INLINE void *location() const;
|
||||
|
||||
bool inRememberedSet(Nursery *n) {
|
||||
return !n->isInside(object) && n->isInside(deref());
|
||||
}
|
||||
JS_ALWAYS_INLINE bool inRememberedSet(Nursery *n) const;
|
||||
|
||||
bool isNullEdge() const {
|
||||
return !deref();
|
||||
}
|
||||
JS_ALWAYS_INLINE bool isNullEdge() const;
|
||||
};
|
||||
|
||||
MonoTypeBuffer<ValueEdge> bufferVal;
|
||||
|
Loading…
Reference in New Issue
Block a user