ddmd.clone

Compiler implementation of the D programming language.

Members

Functions

buildDtor
FuncDeclaration 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. Note the close similarity with StructDeclaration::buildPostBlit(), and the ordering changes (runs backward instead of forwards).

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 struct. ref S opAssign(S s) { ... }

buildOpEquals
FuncDeclaration buildOpEquals(StructDeclaration sd, Scope* sc)

Build opEquals for struct. const bool opEquals(const S s) { ... }

buildPostBlit
FuncDeclaration buildPostBlit(StructDeclaration sd, Scope* sc)

Create inclusive postblit for struct by aggregating all the postblits in postblits[] with the postblits for all the members. Note the close similarity with AggregateDeclaration::buildDtor(), and the ordering changes (runs forward instead of backwards).

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.

hasIdentityOpEquals
FuncDeclaration hasIdentityOpEquals(AggregateDeclaration ad, Scope* sc)

Check given aggregate actually has an identity opEquals or not.

mergeFuncAttrs
StorageClass mergeFuncAttrs(StorageClass s1, FuncDeclaration f)

Merge function attributes pure, nothrow, @safe, @nogc, and @disable

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.

Meta

Source

See Source File
$(DMDSRC _clone.d)