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

Commit

Permalink
AA: do not set TypeInfo_Struct.StructFlags.hasPointers if the entry t…
Browse files Browse the repository at this point in the history
…ype doesn't have pointers
  • Loading branch information
rainers committed Nov 3, 2017
1 parent 16b3b4f commit 2888550
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/rt/aaA.d
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ TypeInfo_Struct fakeEntryTI(const TypeInfo keyti, const TypeInfo valti)

auto rtinfoData = cast(size_t[2]*) (extra + 2);
ti.m_RTInfo = rtinfoEntry(keyti, valti, *rtinfoData);
ti.m_flags = ti.m_RTInfo is rtinfoNoPointers ? cast(TypeInfo_Struct.StructFlags)0 : TypeInfo_Struct.StructFlags.hasPointers;

// we don't expect the Entry objects to be used outside of this module, so we have control
// over the non-usage of the callback methods and other entries and can keep these null
Expand All @@ -279,10 +280,8 @@ TypeInfo_Struct fakeEntryTI(const TypeInfo keyti, const TypeInfo valti)
{
// xdtor needs to be built from the dtors of key and value for the GC
ti.xdtorti = &entryDtor;
ti.m_flags = TypeInfo_Struct.StructFlags.hasPointers | TypeInfo_Struct.StructFlags.isDynamicType;
ti.m_flags |= TypeInfo_Struct.StructFlags.isDynamicType;
}
else
ti.m_flags = TypeInfo_Struct.StructFlags.hasPointers;

ti.m_align = cast(uint) max(kti.talign, vti.talign);

Expand Down

0 comments on commit 2888550

Please sign in to comment.