better code generation for constant aggregates

This commit is contained in:
Araq 2011-11-02 00:55:29 +01:00
commit 351e89e705
10 changed files with 79 additions and 32 deletions

View file

@ -67,7 +67,7 @@ proc genConstStmt(p: BProc, t: PNode) =
var c = it.sons[0].sym
if sfFakeConst in c.flags:
genSingleVar(p, it)
elif c.typ.kind in ConstantDataTypes and not (lfNoDecl in c.loc.flags) and
elif c.typ.kind in ConstantDataTypes and lfNoDecl notin c.loc.flags and
c.ast.len != 0:
# generate the data:
fillLoc(c.loc, locData, c.typ, mangleName(c), OnUnknown)