fixes #4034
This commit is contained in:
parent
38040e7691
commit
11d0f3f7ec
2 changed files with 3 additions and 1 deletions
|
|
@ -570,6 +570,7 @@ proc getTypeDescAux(m: BModule, typ: PType, check: var IntSet): Rope =
|
||||||
of tyRange, tyEnum:
|
of tyRange, tyEnum:
|
||||||
let t = if t.kind == tyRange: t.lastSon else: t
|
let t = if t.kind == tyRange: t.lastSon else: t
|
||||||
result = getTypeName(t)
|
result = getTypeName(t)
|
||||||
|
if isImportedCppType(t): return
|
||||||
idTablePut(m.typeCache, t, result)
|
idTablePut(m.typeCache, t, result)
|
||||||
var size: int
|
var size: int
|
||||||
if firstOrd(t) < 0:
|
if firstOrd(t) < 0:
|
||||||
|
|
|
||||||
|
|
@ -301,7 +301,8 @@ proc resetLoc(p: BProc, loc: var TLoc) =
|
||||||
proc constructLoc(p: BProc, loc: TLoc, isTemp = false) =
|
proc constructLoc(p: BProc, loc: TLoc, isTemp = false) =
|
||||||
let typ = skipTypes(loc.t, abstractRange)
|
let typ = skipTypes(loc.t, abstractRange)
|
||||||
if not isComplexValueType(typ):
|
if not isComplexValueType(typ):
|
||||||
linefmt(p, cpsStmts, "$1 = 0;$n", rdLoc(loc))
|
linefmt(p, cpsStmts, "$1 = ($2)0;$n", rdLoc(loc),
|
||||||
|
getTypeDesc(p.module, typ))
|
||||||
else:
|
else:
|
||||||
if not isTemp or containsGarbageCollectedRef(loc.t):
|
if not isTemp or containsGarbageCollectedRef(loc.t):
|
||||||
# don't use memset for temporary values for performance if we can
|
# don't use memset for temporary values for performance if we can
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue