зеркало из https://github.com/mozilla/pjs.git
Merge backout on TM tip to mozilla-central. (a=blockers)
This commit is contained in:
Коммит
b46f10f783
|
@ -468,7 +468,7 @@ RegisterEnumerator(JSContext *cx, JSObject *iterobj, NativeIterator *ni)
|
||||||
cx->enumerators = iterobj;
|
cx->enumerators = iterobj;
|
||||||
|
|
||||||
JS_ASSERT(!(ni->flags & JSITER_ACTIVE));
|
JS_ASSERT(!(ni->flags & JSITER_ACTIVE));
|
||||||
ni->flags |= (JSITER_ACTIVE | JSITER_REUSABLE);
|
ni->flags |= JSITER_ACTIVE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -788,7 +788,7 @@ js_CloseIterator(JSContext *cx, JSObject *obj)
|
||||||
/* Remove enumerators from the active list, which is a stack. */
|
/* Remove enumerators from the active list, which is a stack. */
|
||||||
NativeIterator *ni = obj->getNativeIterator();
|
NativeIterator *ni = obj->getNativeIterator();
|
||||||
|
|
||||||
if (ni->flags & JSITER_REUSABLE) {
|
if (ni->flags & JSITER_ENUMERATE) {
|
||||||
JS_ASSERT(cx->enumerators == obj);
|
JS_ASSERT(cx->enumerators == obj);
|
||||||
cx->enumerators = ni->next;
|
cx->enumerators = ni->next;
|
||||||
|
|
||||||
|
@ -882,10 +882,6 @@ SuppressDeletedPropertyHelper(JSContext *cx, JSObject *obj, IdPredicate predicat
|
||||||
memmove(idp, idp + 1, (props_end - (idp + 1)) * sizeof(jsid));
|
memmove(idp, idp + 1, (props_end - (idp + 1)) * sizeof(jsid));
|
||||||
ni->props_end = ni->end() - 1;
|
ni->props_end = ni->end() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Don't reuse modified native iterators. */
|
|
||||||
ni->flags &= (~JSITER_REUSABLE);
|
|
||||||
|
|
||||||
if (predicate.matchesAtMostOne())
|
if (predicate.matchesAtMostOne())
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,7 +64,6 @@
|
||||||
* Not serialized by XDR.
|
* Not serialized by XDR.
|
||||||
*/
|
*/
|
||||||
#define JSITER_ACTIVE 0x1000
|
#define JSITER_ACTIVE 0x1000
|
||||||
#define JSITER_REUSABLE 0x2000
|
|
||||||
|
|
||||||
namespace js {
|
namespace js {
|
||||||
|
|
||||||
|
|
|
@ -4224,10 +4224,10 @@ mjit::Compiler::iterEnd()
|
||||||
Address flagAddr(T1, offsetof(NativeIterator, flags));
|
Address flagAddr(T1, offsetof(NativeIterator, flags));
|
||||||
masm.loadPtr(flagAddr, T2);
|
masm.loadPtr(flagAddr, T2);
|
||||||
|
|
||||||
/* Test for (flags & REUSABLE). */
|
/* Test for (flags == ENUMERATE | ACTIVE). */
|
||||||
Jump notReusable = masm.branchTest32(Assembler::Zero, T2,
|
Jump notEnumerate = masm.branch32(Assembler::NotEqual, T2,
|
||||||
Imm32(JSITER_REUSABLE));
|
Imm32(JSITER_ENUMERATE | JSITER_ACTIVE));
|
||||||
stubcc.linkExit(notReusable, Uses(1));
|
stubcc.linkExit(notEnumerate, Uses(1));
|
||||||
|
|
||||||
/* Clear active bit. */
|
/* Clear active bit. */
|
||||||
masm.and32(Imm32(~JSITER_ACTIVE), T2);
|
masm.and32(Imm32(~JSITER_ACTIVE), T2);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче