better code generation for constant aggregates
This commit is contained in:
parent
47f523cfb8
commit
351e89e705
10 changed files with 79 additions and 32 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue