rt.compiler.gdc.rt.lifetime

This module contains all functions related to an object's lifetime: allocation, resizing, deallocation, and finalization.

Members

Functions

_adDupT
Array2 _adDupT(TypeInfo ti, Array2 a)
_d_allocmemory
void* _d_allocmemory(size_t nbytes)
_d_arrayappendT
Array _d_arrayappendT(TypeInfo ti, Array* px, byte[] y)

Append y[] to array x[]. size is size of each array element.

_d_arrayappendcTp
byte[] _d_arrayappendcTp(TypeInfo ti, byte[] x, size_t n)

Extend an array by n elements. Caller must initialize that element.

_d_arrayappendcd
char[] _d_arrayappendcd(char[] x, dchar c)

Append dchar to char[]

_d_arrayappendwd
wchar[] _d_arrayappendwd(wchar[] x, dchar c)

Append dchar to wchar[]

_d_arraycatT
byte[] _d_arraycatT(TypeInfo ti, byte[] x, byte[] y)
_d_arraycatnT
byte[] _d_arraycatnT(TypeInfo ti, uint n, ...)
_d_arrayliteralTp
void* _d_arrayliteralTp(TypeInfo ti, size_t length)
Undocumented in source. Be warned that the author may not have intended to support it.
_d_arraysetlengthT
byte[] _d_arraysetlengthT(TypeInfo ti, size_t newlength, Array* p)

Resize dynamic arrays with 0 initializers.

_d_arraysetlengthiT
byte[] _d_arraysetlengthiT(TypeInfo ti, size_t newlength, Array* p)

Resize arrays for non-zero initializers. p pointer to array lvalue to be updated newlength new .length property of array sizeelem size of each element of array initsize size of initializer ... initializer

_d_callfinalizer
void _d_callfinalizer(void* p)
_d_callinterfacefinalizer
void _d_callinterfacefinalizer(void* p)
_d_delarray
void _d_delarray(Array* p)
_d_delclass
void _d_delclass(Object* p)
_d_delinterface
void _d_delinterface(void** p)
_d_delmemory
void _d_delmemory(void** p)
_d_newarrayT
array_t _d_newarrayT(TypeInfo ti, size_t length)

Allocate a new array of length elements. ti is the type of the resulting array, or pointer to element. (For when the array is initialized to 0)

_d_newarrayiT
array_t _d_newarrayiT(TypeInfo ti, size_t length)

For when the array has a non-zero initializer.

_d_newarraymTp
void[] _d_newarraymTp(TypeInfo ti, int ndims, size_t* pdim)
_d_newarraymiTp
void[] _d_newarraymiTp(TypeInfo ti, int ndims, size_t* pdim)
_d_newclass
Object _d_newclass(ClassInfo ci)
newCapacity
size_t newCapacity(size_t newlength, size_t size)
rt_finalize
void rt_finalize(void* p, bool det)
rt_setCollectHandler
void rt_setCollectHandler(CollectHandler h)

Structs

Array
struct Array
Array2
struct Array2

Support for array.dup property.

Meta

License

This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.

Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, in both source and binary form, subject to the following restrictions:

o The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. o Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. o This notice may not be removed or altered from any source distribution.

Authors

Walter Bright, Sean Kelly