mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-04-30 07:00:46 +03:00
Reduce size of IrDsymbol even more
resolved/defined/declared/initialized are turned into flags.
This commit is contained in:
parent
18f33b1815
commit
32b1d4cc55
8 changed files with 76 additions and 64 deletions
|
@ -1028,9 +1028,9 @@ void DtoResolveVariable(VarDeclaration* vd)
|
|||
#endif
|
||||
|
||||
// don't duplicate work
|
||||
if (vd->ir.resolved) return;
|
||||
vd->ir.resolved = true;
|
||||
vd->ir.declared = true;
|
||||
if (vd->ir.isResolved()) return;
|
||||
vd->ir.setResolved();
|
||||
vd->ir.setDeclared();
|
||||
|
||||
getIrGlobal(vd, true);
|
||||
|
||||
|
@ -1043,8 +1043,9 @@ void DtoResolveVariable(VarDeclaration* vd)
|
|||
|
||||
const bool isLLConst = (vd->isConst() || vd->isImmutable()) && vd->init;
|
||||
|
||||
assert(!vd->ir.initialized);
|
||||
vd->ir.initialized = gIR->dmodule;
|
||||
assert(!vd->ir.isInitialized());
|
||||
if (gIR->dmodule)
|
||||
vd->ir.setInitialized();
|
||||
std::string llName(vd->mangle());
|
||||
|
||||
// Since the type of a global must exactly match the type of its
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue