AggregateDeclaration

Constructors

this
this(Loc loc, Identifier id)
Undocumented in source.

Members

Functions

accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.
checkOverlappedFields
bool checkOverlappedFields()

Calculate fieldi.overlapped and overlapUnsafe, and check that all of explicit field initializers have unique memory space on instance.

determineFields
bool determineFields()

Find all instance fields, then push them into fields.

determineSize
bool determineSize(Loc loc)

Collect all instance fields, then determine instance size.

fill
bool fill(Loc loc, Expressions* elements, bool ctorinit)

Fill out remainder of elements[] with default initializers for fields[].

finalizeSize
void finalizeSize()
Undocumented in source.
getType
Type getType()
Undocumented in source. Be warned that the author may not have intended to support it.
handleType
Type handleType()
Undocumented in source. Be warned that the author may not have intended to support it.
isAggregateDeclaration
inout(AggregateDeclaration) isAggregateDeclaration()
Undocumented in source. Be warned that the author may not have intended to support it.
isDeprecated
bool isDeprecated()
Undocumented in source. Be warned that the author may not have intended to support it.
isExport
bool isExport()
Undocumented in source. Be warned that the author may not have intended to support it.
isNested
bool isNested()

Returns true if there's an extra member which is the 'this' pointer to the enclosing context (enclosing aggregate or function)

makeNested
void makeNested()
Undocumented in source. Be warned that the author may not have intended to support it.
makeNested2
void makeNested2()
Undocumented in source. Be warned that the author may not have intended to support it.
newScope
Scope* newScope(Scope* sc)

Create a new scope from sc. semantic, semantic2 and semantic3 will use this for aggregate members.

nonHiddenFields
size_t nonHiddenFields()
prot
Prot prot()
Undocumented in source. Be warned that the author may not have intended to support it.
searchCtor
Dsymbol searchCtor()

Look for constructor declaration.

setDeprecated
void setDeprecated()

Flag this aggregate as deprecated

setScope
void setScope(Scope* sc)
Undocumented in source. Be warned that the author may not have intended to support it.
size
d_uns64 size(Loc loc)
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

alignmember
void alignmember(structalign_t alignment, uint size, uint* poffset)

Do byte or word alignment as necessary. Align sizes of 0, as we may not know array sizes yet.

placeField
uint placeField(uint* nextoffset, uint memsize, uint memalignsize, structalign_t alignment, uint* paggsize, uint* paggalignsize, bool isunion)

Place a member (mem) into an aggregate (agg), which can be a struct, union or class

Variables

aggNew
NewDeclaration aggNew;
Undocumented in source.
aliasthis
AliasThis aliasthis;
Undocumented in source.
alignsize
uint alignsize;
Undocumented in source.
classKind
ClassKind classKind;

specifies whether this is a D, C++, Objective-C or anonymous struct/class/interface

cppmangle
CPPMANGLE cppmangle;

Specify whether to mangle the aggregate as a class or a struct This information is used by the MSVC mangler Only valid for class and struct. TODO: Merge with ClassKind ?

ctor
Dsymbol ctor;
Undocumented in source.
defaultCtor
CtorDeclaration defaultCtor;
Undocumented in source.
deferred
Dsymbol deferred;
Undocumented in source.
dtor
DtorDeclaration dtor;
Undocumented in source.
dtors
DtorDeclarations dtors;
Undocumented in source.
enclosing
Dsymbol enclosing;
Undocumented in source.
fieldDtor
FuncDeclaration fieldDtor;
Undocumented in source.
fields
VarDeclarations fields;
Undocumented in source.
getRTInfo
Expression getRTInfo;
Undocumented in source.
inv
FuncDeclaration inv;
Undocumented in source.
invs
FuncDeclarations invs;
Undocumented in source.
noDefaultCtor
bool noDefaultCtor;
Undocumented in source.
primaryDtor
DtorDeclaration primaryDtor;
Undocumented in source.
protection
Prot protection;
Undocumented in source.
sinit
Symbol* sinit;
Undocumented in source.
sizeok
Sizeok sizeok;
Undocumented in source.
stag
Symbol* stag;
Undocumented in source.
storage_class
StorageClass storage_class;
Undocumented in source.
structsize
uint structsize;
Undocumented in source.
tidtor
DtorDeclaration tidtor;
Undocumented in source.
type
Type type;
Undocumented in source.
vthis
VarDeclaration vthis;
Undocumented in source.
vthis2
VarDeclaration vthis2;
Undocumented in source.

Inherited Members

From ScopeDsymbol

members
Dsymbols* members;
Undocumented in source.
symtab
DsymbolTable symtab;
Undocumented in source.
endlinnum
uint endlinnum;
Undocumented in source.
syntaxCopy
Dsymbol syntaxCopy(Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.
search
Dsymbol search(Loc loc, Identifier ident, int flags)

This function is #1 on the list of functions that eat cpu time. Be very, very careful about slowing it down.

importScope
void importScope(Dsymbol s, Prot protection)
Undocumented in source. Be warned that the author may not have intended to support it.
addAccessiblePackage
void addAccessiblePackage(Package p, Prot protection)
Undocumented in source. Be warned that the author may not have intended to support it.
isPackageAccessible
bool isPackageAccessible(Package p, Prot protection, int flags)
Undocumented in source. Be warned that the author may not have intended to support it.
isforwardRef
bool isforwardRef()
Undocumented in source. Be warned that the author may not have intended to support it.
multiplyDefined
void multiplyDefined(Loc loc, Dsymbol s1, Dsymbol s2)
Undocumented in source. Be warned that the author may not have intended to support it.
kind
const(char)* kind()
Undocumented in source. Be warned that the author may not have intended to support it.
findGetMembers
FuncDeclaration findGetMembers()

Look for member of the form: const(MemberInfo)[] getMembers(string); Returns NULL if not found

symtabInsert
Dsymbol symtabInsert(Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.
symtabLookup
Dsymbol symtabLookup(Dsymbol s, Identifier id)

Look up identifier in symbol table.

hasStaticCtorOrDtor
bool hasStaticCtorOrDtor()

Return true if any of the members are static ctors or static dtors, or if any members have members that are.

ForeachDg
alias ForeachDg = int delegate(size_t idx, Dsymbol s)
Undocumented in source.
_foreach
int _foreach(Scope* sc, Dsymbols* members, ForeachDg dg, size_t* pn)

Expands attribute declarations in members in depth first order. Calls dg(size_t symidx, Dsymbol *sym) for each member. If dg returns !=0, stops and returns that value else returns 0. Use this function to avoid the O(N + N^2/2) complexity of calculating dim and calling N times getNth.

isScopeDsymbol
inout(ScopeDsymbol) isScopeDsymbol()
Undocumented in source. Be warned that the author may not have intended to support it.
accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta