commit
683e1e8faf
1 changed files with 10 additions and 7 deletions
|
|
@ -1265,13 +1265,16 @@ proc computeSizeAux(typ: PType, a: var BiggestInt): BiggestInt =
|
||||||
else: result = 8
|
else: result = 8
|
||||||
a = result
|
a = result
|
||||||
of tySet:
|
of tySet:
|
||||||
length = lengthOrd(typ.sons[0])
|
if typ.sons[0].kind == tyGenericParam:
|
||||||
if length <= 8: result = 1
|
result = szUnknownSize
|
||||||
elif length <= 16: result = 2
|
else:
|
||||||
elif length <= 32: result = 4
|
length = lengthOrd(typ.sons[0])
|
||||||
elif length <= 64: result = 8
|
if length <= 8: result = 1
|
||||||
elif align(length, 8) mod 8 == 0: result = align(length, 8) div 8
|
elif length <= 16: result = 2
|
||||||
else: result = align(length, 8) div 8 + 1
|
elif length <= 32: result = 4
|
||||||
|
elif length <= 64: result = 8
|
||||||
|
elif align(length, 8) mod 8 == 0: result = align(length, 8) div 8
|
||||||
|
else: result = align(length, 8) div 8 + 1
|
||||||
a = result
|
a = result
|
||||||
of tyRange:
|
of tyRange:
|
||||||
result = computeSizeAux(typ.sons[0], a)
|
result = computeSizeAux(typ.sons[0], a)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue