fixes #1140
This commit is contained in:
parent
d0438540d0
commit
a11ae9248f
2 changed files with 3 additions and 1 deletions
|
|
@ -127,7 +127,8 @@ proc createStrKeepNode(x: var TFullReg) =
|
||||||
elif x.node.kind == nkNilLit:
|
elif x.node.kind == nkNilLit:
|
||||||
system.reset(x.node[])
|
system.reset(x.node[])
|
||||||
x.node.kind = nkStrLit
|
x.node.kind = nkStrLit
|
||||||
elif x.node.kind notin {nkStrLit..nkTripleStrLit}:
|
elif x.node.kind notin {nkStrLit..nkTripleStrLit} or
|
||||||
|
nfAllConst in x.node.flags:
|
||||||
# XXX this is hacky; tests/txmlgen triggers it:
|
# XXX this is hacky; tests/txmlgen triggers it:
|
||||||
x.node = newNode(nkStrLit)
|
x.node = newNode(nkStrLit)
|
||||||
# debug x.node
|
# debug x.node
|
||||||
|
|
|
||||||
|
|
@ -331,6 +331,7 @@ proc canonValue*(n: PNode): PNode =
|
||||||
proc rawGenLiteral(c: PCtx; n: PNode): int =
|
proc rawGenLiteral(c: PCtx; n: PNode): int =
|
||||||
result = c.constants.len
|
result = c.constants.len
|
||||||
assert(n.kind != nkCall)
|
assert(n.kind != nkCall)
|
||||||
|
n.flags.incl nfAllConst
|
||||||
c.constants.add n.canonValue
|
c.constants.add n.canonValue
|
||||||
internalAssert result < 0x7fff
|
internalAssert result < 0x7fff
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue