0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2025-01-16 09:36:54 +01:00

ircd::js: Add uninitialized constructor for cheap object handle creation.

This commit is contained in:
Jason Volk 2016-11-02 06:18:29 -07:00
parent edd77d2265
commit 6cc89f2613

View file

@ -31,7 +31,7 @@ struct object
:root<JSObject *, L>
{
IRCD_OVERLOAD(array)
IRCD_OVERLOAD(uninitialized)
using handle = typename root<JSObject *, L>::handle;
using handle_mutable = typename root<JSObject *, L>::handle_mutable;
@ -54,6 +54,7 @@ struct object
object(const value<L> &);
object(JSObject *const &);
object(JSObject &);
object(uninitialized_t);
object();
};
@ -85,6 +86,12 @@ IRCD_STRONG_TYPEDEF(uint, reserved)
//
namespace basic {
template<lifetime L>
object<L>::object(uninitialized_t)
:object<L>::root::type{}
{
}
template<lifetime L>
object<L>::object()
:object<L>::root::type