Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Mark aaA functions with pure, nothrow, and friends.
Browse files Browse the repository at this point in the history
  • Loading branch information
denis-sh committed Jun 18, 2013
1 parent 79f5405 commit 5e45fb5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/rt/aaA.d
Expand Up @@ -22,7 +22,7 @@ private

// Convenience function to make sure the NO_INTERIOR gets set on the
// bucket array.
Entry*[] newBuckets(in size_t len)
Entry*[] newBuckets(in size_t len) @trusted pure nothrow
{
auto ptr = cast(Entry**) GC.calloc(
len * (Entry*).sizeof, GC.BlkAttr.NO_INTERIOR);
Expand Down Expand Up @@ -88,7 +88,7 @@ struct AA
* in value.
*/

size_t aligntsize(in size_t tsize) nothrow
size_t aligntsize(in size_t tsize) @safe pure nothrow
{
version (D_LP64) {
// align to 16 bytes on 64-bit
Expand Down Expand Up @@ -173,7 +173,7 @@ private void _aaInvAh_x(Entry *e)
* Determine number of entries in associative array.
*/

size_t _aaLen(in AA aa)
size_t _aaLen(in AA aa) pure nothrow
in
{
//printf("_aaLen()+\n");
Expand Down Expand Up @@ -416,7 +416,7 @@ bool _aaDelX(AA aa, in TypeInfo keyti, in void* pkey)
* Produce array of values from aa.
*/

inout(ArrayRet_t) _aaValues(inout AA aa, in size_t keysize, in size_t valuesize)
inout(ArrayRet_t) _aaValues(inout AA aa, in size_t keysize, in size_t valuesize) pure nothrow
{
size_t resi;
Array a;
Expand Down Expand Up @@ -450,7 +450,7 @@ inout(ArrayRet_t) _aaValues(inout AA aa, in size_t keysize, in size_t valuesize)
* Rehash an array.
*/

void* _aaRehash(AA* paa, in TypeInfo keyti)
void* _aaRehash(AA* paa, in TypeInfo keyti) pure nothrow
in
{
//_aaInvAh(paa);
Expand Down Expand Up @@ -506,7 +506,7 @@ body
* Produce array of N byte keys from aa.
*/

inout(ArrayRet_t) _aaKeys(inout AA aa, in size_t keysize)
inout(ArrayRet_t) _aaKeys(inout AA aa, in size_t keysize) pure nothrow
{
auto len = _aaLen(aa);
if (!len)
Expand Down Expand Up @@ -792,7 +792,7 @@ Impl* _d_assocarrayliteralTX(TypeInfo_AssociativeArray ti, void[] keys, void[] v
}


static TypeInfo_AssociativeArray _aaUnwrapTypeInfo(const(TypeInfo) tiRaw) nothrow
static TypeInfo_AssociativeArray _aaUnwrapTypeInfo(const(TypeInfo) tiRaw) pure nothrow
{
const(TypeInfo)* p = &tiRaw;
TypeInfo_AssociativeArray ti;
Expand Down

0 comments on commit 5e45fb5

Please sign in to comment.