зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1289165
- Apply the optimizations in moveDenseElements to unboxed objects; r=sfink
This commit is contained in:
Родитель
d98ac10c0c
Коммит
0391a50050
|
@ -568,10 +568,12 @@ MoveBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj, uint32_t dstStart,
|
|||
uint8_t* data = obj->as<UnboxedArrayObject>().elements();
|
||||
size_t elementSize = UnboxedTypeSize(Type);
|
||||
|
||||
if (UnboxedTypeNeedsPreBarrier(Type)) {
|
||||
if (UnboxedTypeNeedsPreBarrier(Type) &&
|
||||
JS::shadow::Zone::asShadowZone(obj->zone())->needsIncrementalBarrier())
|
||||
{
|
||||
// Trigger pre barriers on any elements we are overwriting. See
|
||||
// moveDenseElements::moveDenseElements. No post barrier is needed
|
||||
// as only whole cell post barriers are used with unboxed objects.
|
||||
// NativeObject::moveDenseElements. No post barrier is needed as
|
||||
// only whole cell post barriers are used with unboxed objects.
|
||||
for (size_t i = 0; i < length; i++)
|
||||
obj->as<UnboxedArrayObject>().triggerPreBarrier<Type>(dstStart + i);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче