Bug 985687 - Remove vestigial tinyid/shortid references, as well as the field in JSPropertySpec. Followup to bug 975069. r=luke

--HG--
extra : rebase_source : 9e4bd270925efb155dacb91470b617f169526824
This commit is contained in:
Jeff Walden 2014-03-20 23:24:21 -07:00
Родитель 40a47ea060
Коммит 85e409d130
4 изменённых файлов: 12 добавлений и 18 удалений

Просмотреть файл

@ -1846,7 +1846,7 @@ class AttrDefiner(PropertyDefiner):
return self.generatePrefableArray(
array, name,
' { "%s", 0, %s, %s, %s}',
' { "%s", %s, %s, %s}',
' JS_PS_END',
'JSPropertySpec',
PropertyDefiner.getControllingCondition, specData, doIdArrays)

Просмотреть файл

@ -2395,7 +2395,6 @@ struct JSPropertySpec {
};
const char *name;
int8_t tinyid;
uint8_t flags;
union {
JSPropertyOpWrapper propertyOp;
@ -2449,26 +2448,26 @@ CheckIsCharacterLiteral(const char (&arr)[N]);
* JSNatives.
*/
#define JS_PSG(name, getter, flags) \
{name, 0, \
{name, \
uint8_t(JS_CHECK_ACCESSOR_FLAGS(flags) | JSPROP_SHARED | JSPROP_NATIVE_ACCESSORS), \
JSOP_WRAPPER(JS_CAST_NATIVE_TO(getter, JSPropertyOp)), \
JSOP_NULLWRAPPER}
#define JS_PSGS(name, getter, setter, flags) \
{name, 0, \
{name, \
uint8_t(JS_CHECK_ACCESSOR_FLAGS(flags) | JSPROP_SHARED | JSPROP_NATIVE_ACCESSORS), \
JSOP_WRAPPER(JS_CAST_NATIVE_TO(getter, JSPropertyOp)), \
JSOP_WRAPPER(JS_CAST_NATIVE_TO(setter, JSStrictPropertyOp))}
#define JS_SELF_HOSTED_GET(name, getterName, flags) \
{name, 0, \
{name, \
uint8_t(JS_CHECK_ACCESSOR_FLAGS(flags) | JSPROP_SHARED | JSPROP_GETTER), \
{ nullptr, JS_CAST_STRING_TO(getterName, const JSJitInfo *) }, \
JSOP_NULLWRAPPER }
#define JS_SELF_HOSTED_GETSET(name, getterName, setterName, flags) \
{name, 0, \
{name, \
uint8_t(JS_CHECK_ACCESSOR_FLAGS(flags) | JSPROP_SHARED | JSPROP_GETTER | JSPROP_SETTER), \
{ nullptr, JS_CAST_STRING_TO(getterName, const JSJitInfo *) }, \
{ nullptr, JS_CAST_STRING_TO(setterName, const JSJitInfo *) } }
#define JS_PS_END {0, 0, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
#define JS_PS_END { nullptr, 0, JSOP_NULLWRAPPER, JSOP_NULLWRAPPER }
/*
* To define a native function, set call to a JSNativeWrapper. To define a

Просмотреть файл

@ -5158,7 +5158,7 @@ static const JSJitInfo doFoo_methodinfo = {
};
static const JSPropertySpec dom_props[] = {
{"x", 0,
{"x",
JSPROP_SHARED | JSPROP_ENUMERATE | JSPROP_NATIVE_ACCESSORS,
{ { (JSPropertyOp)dom_genericGetter, &dom_x_getterinfo } },
{ { (JSStrictPropertyOp)dom_genericSetter, &dom_x_setterinfo } }

Просмотреть файл

@ -755,19 +755,19 @@ js::XDRStaticBlockObject(XDRState<mode> *xdr, HandleObject enclosingScope,
if (!xdr->codeUint32(&offset))
return false;
/*
* XDR the block object's properties. We know that there are 'count'
* properties to XDR, stored as id/aliased pairs. (The empty string as
* id indicates an int id.)
*/
if (mode == XDR_DECODE) {
obj->setLocalOffset(offset);
/*
* XDR the block object's properties. We know that there are 'count'
* properties to XDR, stored as id/shortid pairs.
*/
for (unsigned i = 0; i < count; i++) {
RootedAtom atom(cx);
if (!XDRAtom(xdr, &atom))
return false;
/* The empty string indicates an int id. */
RootedId id(cx, atom != cx->runtime()->emptyString
? AtomToId(atom)
: INT_TO_JSID(i));
@ -793,10 +793,6 @@ js::XDRStaticBlockObject(XDRState<mode> *xdr, HandleObject enclosingScope,
for (Shape::Range<NoGC> r(obj->lastProperty()); !r.empty(); r.popFront())
shapes[obj->shapeToIndex(r.front())] = &r.front();
/*
* XDR the block object's properties. We know that there are 'count'
* properties to XDR, stored as id/shortid pairs.
*/
RootedShape shape(cx);
RootedId propid(cx);
RootedAtom atom(cx);
@ -808,7 +804,6 @@ js::XDRStaticBlockObject(XDRState<mode> *xdr, HandleObject enclosingScope,
propid = shape->propid();
JS_ASSERT(JSID_IS_ATOM(propid) || JSID_IS_INT(propid));
/* The empty string indicates an int id. */
atom = JSID_IS_ATOM(propid)
? JSID_TO_ATOM(propid)
: cx->runtime()->emptyString;