mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 867426 - Remove RawUnownedBaseShape typedef; r=jonco
--HG-- extra : rebase_source : 8a0c79db1cb2a75c9f55eee179e541fbefaddf8a
This commit is contained in:
parent
723b7e1608
commit
d4acfa8dae
@ -873,7 +873,7 @@ ScanBaseShape(GCMarker *gcmarker, BaseShape *base)
|
||||
* unowned base shape.
|
||||
*/
|
||||
if (base->isOwned()) {
|
||||
RawUnownedBaseShape unowned = base->baseUnowned();
|
||||
UnownedBaseShape *unowned = base->baseUnowned();
|
||||
JS_ASSERT(base->compartment() == unowned->compartment());
|
||||
unowned->markIfUnmarked(gcmarker->getMarkColor());
|
||||
}
|
||||
|
@ -123,7 +123,7 @@ Bindings::initWithTemporaryStorage(JSContext *cx, InternalBindingsHandle self,
|
||||
StackBaseShape base(cx->compartment, &CallClass, cx->global(),
|
||||
BaseShape::VAROBJ | BaseShape::DELEGATE);
|
||||
|
||||
RawUnownedBaseShape nbase = BaseShape::getUnowned(cx, base);
|
||||
UnownedBaseShape *nbase = BaseShape::getUnowned(cx, base);
|
||||
if (!nbase)
|
||||
return false;
|
||||
|
||||
|
@ -160,7 +160,7 @@ StackBaseShape::updateGetterSetter(uint8_t attrs,
|
||||
}
|
||||
|
||||
inline void
|
||||
BaseShape::adoptUnowned(RawUnownedBaseShape other)
|
||||
BaseShape::adoptUnowned(UnownedBaseShape *other)
|
||||
{
|
||||
/*
|
||||
* This is a base shape owned by a dictionary object, update it to reflect the
|
||||
@ -180,7 +180,7 @@ BaseShape::adoptUnowned(RawUnownedBaseShape other)
|
||||
}
|
||||
|
||||
inline void
|
||||
BaseShape::setOwned(RawUnownedBaseShape unowned)
|
||||
BaseShape::setOwned(UnownedBaseShape *unowned)
|
||||
{
|
||||
flags |= OWNED_SHAPE;
|
||||
this->unowned_ = unowned;
|
||||
@ -191,7 +191,7 @@ BaseShape::assertConsistency()
|
||||
{
|
||||
#ifdef DEBUG
|
||||
if (isOwned()) {
|
||||
RawUnownedBaseShape unowned = baseUnowned();
|
||||
UnownedBaseShape *unowned = baseUnowned();
|
||||
JS_ASSERT(hasGetterObject() == unowned->hasGetterObject());
|
||||
JS_ASSERT(hasSetterObject() == unowned->hasSetterObject());
|
||||
JS_ASSERT_IF(hasGetterObject(), getterObject() == unowned->getterObject());
|
||||
@ -216,7 +216,7 @@ Shape::Shape(const StackShape &other, uint32_t nfixed)
|
||||
}
|
||||
|
||||
inline
|
||||
Shape::Shape(RawUnownedBaseShape base, uint32_t nfixed)
|
||||
Shape::Shape(UnownedBaseShape *base, uint32_t nfixed)
|
||||
: base_(base),
|
||||
propid_(JSID_EMPTY),
|
||||
slotInfo(SHAPE_INVALID_SLOT | (nfixed << FIXED_SLOTS_SHIFT)),
|
||||
@ -396,7 +396,7 @@ Shape::initDictionaryShape(const StackShape &child, uint32_t nfixed, HeapPtrShap
|
||||
}
|
||||
|
||||
inline
|
||||
EmptyShape::EmptyShape(RawUnownedBaseShape base, uint32_t nfixed)
|
||||
EmptyShape::EmptyShape(UnownedBaseShape *base, uint32_t nfixed)
|
||||
: js::Shape(base, nfixed)
|
||||
{
|
||||
/* Only empty shapes can be NON_NATIVE. */
|
||||
|
@ -305,7 +305,7 @@ Shape::replaceLastProperty(JSContext *cx, const StackBaseShape &base,
|
||||
StackShape child(shape);
|
||||
StackShape::AutoRooter childRoot(cx, &child);
|
||||
{
|
||||
RawUnownedBaseShape nbase = BaseShape::getUnowned(cx, base);
|
||||
UnownedBaseShape *nbase = BaseShape::getUnowned(cx, base);
|
||||
if (!nbase)
|
||||
return NULL;
|
||||
|
||||
@ -703,7 +703,7 @@ JSObject::putProperty(JSContext *cx, HandleObject obj, HandleId id,
|
||||
StackBaseShape base(obj->lastProperty()->base());
|
||||
base.updateGetterSetter(attrs, getter, setter);
|
||||
|
||||
RawUnownedBaseShape nbase = BaseShape::getUnowned(cx, base);
|
||||
UnownedBaseShape *nbase = BaseShape::getUnowned(cx, base);
|
||||
if (!nbase)
|
||||
return NULL;
|
||||
|
||||
@ -1008,7 +1008,7 @@ JSObject::setParent(JSContext *cx, HandleObject obj, HandleObject parent)
|
||||
if (obj->inDictionaryMode()) {
|
||||
StackBaseShape base(obj->lastProperty());
|
||||
base.parent = parent;
|
||||
RawUnownedBaseShape nbase = BaseShape::getUnowned(cx, base);
|
||||
UnownedBaseShape *nbase = BaseShape::getUnowned(cx, base);
|
||||
if (!nbase)
|
||||
return false;
|
||||
|
||||
@ -1087,7 +1087,7 @@ js::ObjectImpl::setFlag(JSContext *cx, /*BaseShape::Flag*/ uint32_t flag_,
|
||||
return false;
|
||||
StackBaseShape base(self->lastProperty());
|
||||
base.flags |= flag;
|
||||
RawUnownedBaseShape nbase = BaseShape::getUnowned(cx, base);
|
||||
UnownedBaseShape *nbase = BaseShape::getUnowned(cx, base);
|
||||
if (!nbase)
|
||||
return false;
|
||||
|
||||
@ -1114,7 +1114,7 @@ js::ObjectImpl::clearFlag(JSContext *cx, /*BaseShape::Flag*/ uint32_t flag)
|
||||
|
||||
StackBaseShape base(self->lastProperty());
|
||||
base.flags &= ~flag;
|
||||
RawUnownedBaseShape nbase = BaseShape::getUnowned(cx, base);
|
||||
UnownedBaseShape *nbase = BaseShape::getUnowned(cx, base);
|
||||
if (!nbase)
|
||||
return false;
|
||||
|
||||
@ -1147,7 +1147,7 @@ StackBaseShape::hash(const StackBaseShape *base)
|
||||
}
|
||||
|
||||
/* static */ inline bool
|
||||
StackBaseShape::match(RawUnownedBaseShape key, const StackBaseShape *lookup)
|
||||
StackBaseShape::match(UnownedBaseShape *key, const StackBaseShape *lookup)
|
||||
{
|
||||
return key->flags == lookup->flags
|
||||
&& key->clasp == lookup->clasp
|
||||
@ -1177,7 +1177,7 @@ BaseShape::getUnowned(JSContext *cx, const StackBaseShape &base)
|
||||
|
||||
new (nbase_) BaseShape(base);
|
||||
|
||||
RawUnownedBaseShape nbase = static_cast<RawUnownedBaseShape>(nbase_);
|
||||
UnownedBaseShape *nbase = static_cast<UnownedBaseShape *>(nbase_);
|
||||
|
||||
if (!table.relookupOrAdd(p, &base, nbase))
|
||||
return NULL;
|
||||
@ -1192,7 +1192,7 @@ JSCompartment::sweepBaseShapeTable()
|
||||
|
||||
if (baseShapes.initialized()) {
|
||||
for (BaseShapeSet::Enum e(baseShapes); !e.empty(); e.popFront()) {
|
||||
RawUnownedBaseShape base = e.front();
|
||||
UnownedBaseShape *base = e.front();
|
||||
if (IsBaseShapeAboutToBeFinalized(&base))
|
||||
e.removeFront();
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ struct ShapeTable {
|
||||
* an earlier property, however.
|
||||
*/
|
||||
|
||||
ForwardDeclare(UnownedBaseShape);
|
||||
class UnownedBaseShape;
|
||||
ForwardDeclare(Shape);
|
||||
struct StackBaseShape;
|
||||
|
||||
@ -312,8 +312,8 @@ class BaseShape : public js::gc::Cell
|
||||
inline bool matchesGetterSetter(PropertyOp rawGetter,
|
||||
StrictPropertyOp rawSetter) const;
|
||||
|
||||
inline void adoptUnowned(RawUnownedBaseShape other);
|
||||
inline void setOwned(RawUnownedBaseShape unowned);
|
||||
inline void adoptUnowned(UnownedBaseShape *other);
|
||||
inline void setOwned(UnownedBaseShape *unowned);
|
||||
|
||||
JSObject *getObjectParent() const { return parent; }
|
||||
uint32_t getObjectFlags() const { return flags & OBJECT_FLAG_MASK; }
|
||||
@ -369,16 +369,16 @@ class BaseShape : public js::gc::Cell
|
||||
|
||||
class UnownedBaseShape : public BaseShape {};
|
||||
|
||||
UnownedBaseShape*
|
||||
UnownedBaseShape *
|
||||
BaseShape::unowned()
|
||||
{
|
||||
return isOwned() ? baseUnowned() : toUnowned();
|
||||
}
|
||||
|
||||
UnownedBaseShape*
|
||||
UnownedBaseShape *
|
||||
BaseShape::toUnowned()
|
||||
{
|
||||
JS_ASSERT(!isOwned() && !unowned_); return static_cast<RawUnownedBaseShape>(this);
|
||||
JS_ASSERT(!isOwned() && !unowned_); return static_cast<UnownedBaseShape *>(this);
|
||||
}
|
||||
|
||||
UnownedBaseShape*
|
||||
@ -424,7 +424,7 @@ struct StackBaseShape
|
||||
StrictPropertyOp rawSetter);
|
||||
|
||||
static inline HashNumber hash(const StackBaseShape *lookup);
|
||||
static inline bool match(RawUnownedBaseShape key, const StackBaseShape *lookup);
|
||||
static inline bool match(UnownedBaseShape *key, const StackBaseShape *lookup);
|
||||
|
||||
class AutoRooter : private JS::CustomAutoRooter
|
||||
{
|
||||
@ -626,7 +626,7 @@ class Shape : public js::gc::Cell
|
||||
Shape(const StackShape &other, uint32_t nfixed);
|
||||
|
||||
/* Used by EmptyShape (see jsscopeinlines.h). */
|
||||
Shape(RawUnownedBaseShape base, uint32_t nfixed);
|
||||
Shape(UnownedBaseShape *base, uint32_t nfixed);
|
||||
|
||||
/* Copy constructor disabled, to avoid misuse of the above form. */
|
||||
Shape(const Shape &other) MOZ_DELETE;
|
||||
@ -903,7 +903,7 @@ class AutoRooterGetterSetter
|
||||
|
||||
struct EmptyShape : public js::Shape
|
||||
{
|
||||
EmptyShape(RawUnownedBaseShape base, uint32_t nfixed);
|
||||
EmptyShape(UnownedBaseShape *base, uint32_t nfixed);
|
||||
|
||||
/*
|
||||
* Lookup an initial shape matching the given parameters, creating an empty
|
||||
@ -969,14 +969,14 @@ typedef HashSet<InitialShapeEntry, InitialShapeEntry, SystemAllocPolicy> Initial
|
||||
struct StackShape
|
||||
{
|
||||
/* For performance, StackShape only roots when absolutely necessary. */
|
||||
RawUnownedBaseShape base;
|
||||
RawId propid;
|
||||
uint32_t slot_;
|
||||
uint8_t attrs;
|
||||
uint8_t flags;
|
||||
int16_t shortid;
|
||||
UnownedBaseShape *base;
|
||||
RawId propid;
|
||||
uint32_t slot_;
|
||||
uint8_t attrs;
|
||||
uint8_t flags;
|
||||
int16_t shortid;
|
||||
|
||||
explicit StackShape(RawUnownedBaseShape base, jsid propid, uint32_t slot,
|
||||
explicit StackShape(UnownedBaseShape *base, jsid propid, uint32_t slot,
|
||||
uint32_t nfixed, unsigned attrs, unsigned flags, int shortid)
|
||||
: base(base),
|
||||
propid(propid),
|
||||
|
Loading…
Reference in New Issue
Block a user