Compiler implementation of the D programming language.
The ClassKind enum is used in AggregateDeclaration AST nodes to specify the linkage type of the struct/class/interface or if it is an anonymous class. If the class is anonymous it is also considered to be a D class.
the aggregate is a d(efault) class
the aggregate is a C++ struct/class/interface
the aggregate is an Objective-C class/interface
specifies whether this is a D, C++, Objective-C or anonymous struct/class/interface
Create a new scope from sc. semantic, semantic2 and semantic3 will use this for aggregate members.
Find all instance fields, then push them into fields
.
Runs semantic() for all instance field variables, but also the field types can remain yet not resolved forward references, except direct recursive definitions. After the process sizeok is set to Sizeok.fwd.
Collect all instance fields, then determine instance size.
Calculate field[i].overlapped and overlapUnsafe, and check that all of explicit field initializers have unique memory space on instance.
Fill out remainder of elements[] with default initializers for fields[].
Loc loc
| location |
Expressions* elements
| explicit arguments which given to construct object. |
bool ctorinit
| true if the elements will be used for default initialization. |
Do byte or word alignment as necessary. Align sizes of 0, as we may not know array sizes yet.
structalign_t alignment
| struct alignment that is in effect |
uint size
| alignment requirement of field |
uint* poffset
| pointer to offset to be aligned |
Place a member (mem) into an aggregate (agg), which can be a struct, union or class
Returns true if there's an extra member which is the 'this' pointer to the enclosing context (enclosing aggregate or function)
Look for constructor declaration.
© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/dmd_aggregate.html