summaryrefslogtreecommitdiff
path: root/js/src/vm/UnboxedObject-inl.h
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-06-13 10:54:46 +0000
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-06-13 10:54:46 +0000
commit7ba3b14487a9116f963a5ff4634196da9a3c37e7 (patch)
tree0ad534cf743ec3e2425ffdfbd1cb3d0f7097155b /js/src/vm/UnboxedObject-inl.h
parentef8e0ce6075150ed4501edad1376e4046cd8e3cb (diff)
downloaduxp-7ba3b14487a9116f963a5ff4634196da9a3c37e7.tar.gz
Convert CopyBoxedOrUnboxedDenseElements to calls to initDenseElement
Diffstat (limited to 'js/src/vm/UnboxedObject-inl.h')
-rw-r--r--js/src/vm/UnboxedObject-inl.h18
1 files changed, 0 insertions, 18 deletions
diff --git a/js/src/vm/UnboxedObject-inl.h b/js/src/vm/UnboxedObject-inl.h
index 711a064f27..0695271417 100644
--- a/js/src/vm/UnboxedObject-inl.h
+++ b/js/src/vm/UnboxedObject-inl.h
@@ -226,24 +226,6 @@ MoveBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* obj, uint32_t dstStart,
return DenseElementResult::Success;
}
-static inline DenseElementResult
-CopyBoxedOrUnboxedDenseElements(JSContext* cx, JSObject* dst, JSObject* src,
- uint32_t dstStart, uint32_t srcStart, uint32_t length)
-{
- MOZ_ASSERT(src->isNative());
- MOZ_ASSERT(dst->isNative());
- MOZ_ASSERT(dst->as<NativeObject>().getDenseInitializedLength() == dstStart);
- MOZ_ASSERT(src->as<NativeObject>().getDenseInitializedLength() >= srcStart + length);
- MOZ_ASSERT(dst->as<NativeObject>().getDenseCapacity() >= dstStart + length);
-
- dst->as<NativeObject>().setDenseInitializedLength(dstStart + length);
-
- const Value* vp = src->as<NativeObject>().getDenseElements() + srcStart;
- dst->as<NativeObject>().initDenseElements(dstStart, vp, length);
-
- return DenseElementResult::Success;
-}
-
} // namespace js
#endif // vm_UnboxedObject_inl_h