- buildDtor
DtorDeclaration buildDtor(AggregateDeclaration ad, Scope* sc)
Create inclusive destructor for struct/class by aggregating
all the destructors in dtors[] with the destructors for
all the members.
- buildExternDDtor
DtorDeclaration buildExternDDtor(AggregateDeclaration ad, Scope* sc)
build a shim function around the compound dtor that translates
a C++ destructor to a destructor with extern(D) calling convention
- buildInv
FuncDeclaration buildInv(AggregateDeclaration ad, Scope* sc)
Create inclusive invariant for struct/class by aggregating
all the invariants in invs[].
void __invariant() const [pure nothrow @trusted]
{
invs0, invs1, ...;
}
- buildOpAssign
FuncDeclaration buildOpAssign(StructDeclaration sd, Scope* sc)
Build opAssign for a struct.
- buildOpEquals
FuncDeclaration buildOpEquals(StructDeclaration sd, Scope* sc)
Build opEquals for struct.
const bool opEquals(const S s) { ... }
- buildXopCmp
FuncDeclaration buildXopCmp(StructDeclaration sd, Scope* sc)
Build __xopCmp for TypeInfo_Struct
static bool __xopCmp(ref const S p, ref const S q)
{
return p.opCmp(q);
}
- buildXopEquals
FuncDeclaration buildXopEquals(StructDeclaration sd, Scope* sc)
Build __xopEquals for TypeInfo_Struct
static bool __xopEquals(ref const S p, ref const S q)
{
return p == q;
}
- buildXtoHash
FuncDeclaration buildXtoHash(StructDeclaration sd, Scope* sc)
Build __xtoHash for non-bitwise hashing
static hash_t xtoHash(ref const S p) nothrow @trusted;
- hasIdentityOpAssign
FuncDeclaration hasIdentityOpAssign(AggregateDeclaration ad, Scope* sc)
Check given aggregate actually has an identity opAssign or not.
- mergeFuncAttrs
StorageClass mergeFuncAttrs(StorageClass s1, const FuncDeclaration f)
Merge function attributes pure, nothrow, @safe, @nogc, and @disable
from f into s1.
- needOpEquals
bool needOpEquals(StructDeclaration sd)
We need an opEquals for the struct if
any fields has an opEquals.
Generate one if a user-specified one does not exist.
Define the implicit opEquals, opAssign, post blit, copy constructor and destructor for structs.