generate typedefs for bitsets for better debugging support
This commit is contained in:
parent
c912ae6cb3
commit
2024e1335f
1 changed files with 7 additions and 10 deletions
|
|
@ -674,16 +674,13 @@ proc getTypeDescAux(m: BModule, typ: PType, check: var IntSet): Rope =
|
||||||
else: getTupleDesc(m, t, result, check)
|
else: getTupleDesc(m, t, result, check)
|
||||||
if not isImportedType(t): add(m.s[cfsTypes], recdesc)
|
if not isImportedType(t): add(m.s[cfsTypes], recdesc)
|
||||||
of tySet:
|
of tySet:
|
||||||
case int(getSize(t))
|
result = getTypeName(t.lastSon) & "Set"
|
||||||
of 1: result = rope("NU8")
|
idTablePut(m.typeCache, t, result)
|
||||||
of 2: result = rope("NU16")
|
if not isImportedType(t):
|
||||||
of 4: result = rope("NU32")
|
let s = int(getSize(t))
|
||||||
of 8: result = rope("NU64")
|
case s
|
||||||
else:
|
of 1, 2, 4, 8: addf(m.s[cfsTypes], "typedef NU$2 $1;$n", [result, rope(s*8)])
|
||||||
result = getTypeName(t)
|
else: addf(m.s[cfsTypes], "typedef NU8 $1[$2];$n",
|
||||||
idTablePut(m.typeCache, t, result)
|
|
||||||
if not isImportedType(t):
|
|
||||||
addf(m.s[cfsTypes], "typedef NU8 $1[$2];$n",
|
|
||||||
[result, rope(getSize(t))])
|
[result, rope(getSize(t))])
|
||||||
of tyGenericInst, tyDistinct, tyOrdinal, tyConst, tyMutable,
|
of tyGenericInst, tyDistinct, tyOrdinal, tyConst, tyMutable,
|
||||||
tyIter, tyTypeDesc:
|
tyIter, tyTypeDesc:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue