mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 23:20:40 +03:00
Make IrDsymbol to be a typesafe union to reduce memory usage
This commit is contained in:
parent
5b15095c81
commit
18f33b1815
27 changed files with 465 additions and 293 deletions
|
@ -53,8 +53,7 @@ void DtoResolveStruct(StructDeclaration* sd, Loc& callerLoc)
|
|||
}
|
||||
|
||||
// create the IrAggr
|
||||
IrAggr* iraggr = new IrAggr(sd);
|
||||
sd->ir.irAggr = iraggr;
|
||||
getIrAggr(sd, true);
|
||||
|
||||
// Set up our field metadata.
|
||||
for (VarDeclarations::iterator I = sd->fields.begin(),
|
||||
|
@ -62,8 +61,8 @@ void DtoResolveStruct(StructDeclaration* sd, Loc& callerLoc)
|
|||
I != E; ++I)
|
||||
{
|
||||
VarDeclaration *vd = *I;
|
||||
assert(!vd->ir.irField);
|
||||
(void)new IrField(vd);
|
||||
assert(!isIrFieldCreated(vd));
|
||||
getIrField(vd, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -99,7 +98,7 @@ LLValue* DtoIndexStruct(LLValue* src, StructDeclaration* sd, VarDeclaration* vd)
|
|||
DtoResolveStruct(sd);
|
||||
|
||||
// vd must be a field
|
||||
IrField* field = vd->ir.irField;
|
||||
IrField* field = getIrField(vd);
|
||||
assert(field);
|
||||
|
||||
// get the start pointer
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue