@@ -50,7 +50,7 @@ struct AA
50
50
private struct Impl
51
51
{
52
52
private :
53
- this (scope const TypeInfo_AssociativeArray ti, size_t sz = INIT_NUM_BUCKETS )
53
+ this (scope const TypeInfo_AssociativeArray ti, size_t sz = INIT_NUM_BUCKETS ) nothrow
54
54
{
55
55
keysz = cast (uint ) ti.key.tsize;
56
56
valsz = cast (uint ) ti.value.tsize;
@@ -125,7 +125,7 @@ private:
125
125
}
126
126
}
127
127
128
- void grow (scope const TypeInfo keyti)
128
+ void grow (scope const TypeInfo keyti) pure nothrow
129
129
{
130
130
// If there are so many deleted entries, that growing would push us
131
131
// below the shrink threshold, we just purge deleted entries instead.
@@ -135,7 +135,7 @@ private:
135
135
resize(GROW_FAC * dim);
136
136
}
137
137
138
- void shrink (scope const TypeInfo keyti)
138
+ void shrink (scope const TypeInfo keyti) pure nothrow
139
139
{
140
140
if (dim > INIT_NUM_BUCKETS )
141
141
resize(dim / GROW_FAC );
@@ -233,7 +233,7 @@ package void entryDtor(void* p, const TypeInfo_Struct sti)
233
233
extra[1 ].destroy (p + talign(extra[0 ].tsize, extra[1 ].talign));
234
234
}
235
235
236
- private bool hasDtor (const TypeInfo ti)
236
+ private bool hasDtor (const TypeInfo ti) pure nothrow
237
237
{
238
238
import rt.lifetime : unqualify;
239
239
@@ -246,15 +246,15 @@ private bool hasDtor(const TypeInfo ti)
246
246
return false ;
247
247
}
248
248
249
- private immutable (void )* getRTInfo (const TypeInfo ti)
249
+ private immutable (void )* getRTInfo (const TypeInfo ti) pure nothrow
250
250
{
251
251
// classes are references
252
252
const isNoClass = ti && typeid (ti) ! is typeid (TypeInfo_Class );
253
253
return isNoClass ? ti.rtInfo() : rtinfoHasPointers;
254
254
}
255
255
256
256
// build type info for Entry with additional key and value fields
257
- TypeInfo_Struct fakeEntryTI (ref Impl aa, const TypeInfo keyti, const TypeInfo valti)
257
+ TypeInfo_Struct fakeEntryTI (ref Impl aa, const TypeInfo keyti, const TypeInfo valti) nothrow
258
258
{
259
259
import rt.lifetime : unqualify;
260
260
@@ -319,7 +319,8 @@ TypeInfo_Struct fakeEntryTI(ref Impl aa, const TypeInfo keyti, const TypeInfo va
319
319
}
320
320
321
321
// build appropriate RTInfo at runtime
322
- immutable (void )* rtinfoEntry (ref Impl aa, immutable (size_t )* keyinfo, immutable (size_t )* valinfo, size_t * rtinfoData, size_t rtinfoSize)
322
+ immutable (void )* rtinfoEntry (ref Impl aa, immutable (size_t )* keyinfo,
323
+ immutable (size_t )* valinfo, size_t * rtinfoData, size_t rtinfoSize) pure nothrow
323
324
{
324
325
enum bitsPerWord = 8 * size_t .sizeof;
325
326
@@ -456,7 +457,7 @@ private size_t mix(size_t h) @safe pure nothrow @nogc
456
457
return h;
457
458
}
458
459
459
- private size_t calcHash (scope const void * pkey, scope const TypeInfo keyti)
460
+ private size_t calcHash (scope const void * pkey, scope const TypeInfo keyti) nothrow
460
461
{
461
462
immutable hash = keyti.getHash(pkey);
462
463
// highest bit is set to distinguish empty/deleted from filled buckets
0 commit comments