Bug 487546: Fix shell bustage, r=brendan

This commit is contained in:
David Mandelin 2009-04-16 17:23:43 -07:00
Родитель 5399360a47
Коммит af6c28a130
2 изменённых файлов: 11 добавлений и 7 удалений

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

@ -306,6 +306,12 @@ extern void js_SetScopeInfo(JSScope *scope, const char *file, int line);
extern JSBool
js_CompareAndSwap(jsword *w, jsword ov, jsword nv);
/* Atomically bitwise-or the mask into the word *w using compare and swap. */
extern void
js_AtomicSetMask(jsword *w, jsword mask);
#define JS_ATOMIC_SET_MASK(w, mask) js_AtomicSetMask(w, mask)
#else
static inline JSBool
@ -314,11 +320,9 @@ js_CompareAndSwap(jsword *w, jsword ov, jsword nv)
return (*w == ov) ? *w = nv, JS_TRUE : JS_FALSE;
}
#endif
#define JS_ATOMIC_SET_MASK(w, mask) *(w) |= mask
/* Atomically bitwise-or the mask into the word *w using compare and swap. */
extern void
js_AtomicSetMask(jsword *w, jsword mask);
#endif /* JS_THREADSAFE */
JS_END_EXTERN_C

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

@ -142,8 +142,8 @@ JS_STATIC_ASSERT(sizeof(size_t) == sizeof(jsword));
#define JSSTRING_IS_DEFLATED(str) ((str)->length & JSSTRFLAG_DEFLATED)
#define JSSTRING_SET_DEFLATED(str) js_AtomicSetMask((jsword*)&(str)->length, \
JSSTRFLAG_DEFLATED);
#define JSSTRING_SET_DEFLATED(str) \
JS_ATOMIC_SET_MASK((jsword*)&(str)->length, JSSTRFLAG_DEFLATED)
#define JSSTRING_CHARS_AND_LENGTH(str, chars_, length_) \
((void)(JSSTRING_IS_DEPENDENT(str) \
@ -197,7 +197,7 @@ JS_STATIC_ASSERT(sizeof(size_t) == sizeof(jsword));
#define JSFLATSTR_SET_ATOMIZED(str) \
JS_BEGIN_MACRO \
JS_ASSERT(JSSTRING_IS_FLAT(str) && !JSSTRING_IS_MUTABLE(str)); \
js_AtomicSetMask((jsword*) &(str)->length, JSSTRFLAG_ATOMIZED); \
JS_ATOMIC_SET_MASK((jsword*) &(str)->length, JSSTRFLAG_ATOMIZED); \
JS_END_MACRO
#define JSFLATSTR_SET_MUTABLE(str) \