more fixes to get rid of tyPureObject
This commit is contained in:
parent
98e5beb936
commit
92543a3037
4 changed files with 8 additions and 8 deletions
|
|
@ -122,7 +122,7 @@ proc storeAux(dest, src: Pointer, mt: PNimType, t: PRawChannel,
|
|||
# XXX use dynamic type here!
|
||||
pint[] = mt
|
||||
storeAux(dest, src, mt.node, t, mode)
|
||||
of tyTuple, tyPureObject:
|
||||
of tyTuple:
|
||||
storeAux(dest, src, mt.node, t, mode)
|
||||
of tyArray, tyArrayConstr:
|
||||
for i in 0..(mt.size div mt.base.size)-1:
|
||||
|
|
|
|||
|
|
@ -402,7 +402,7 @@ include "system/hti"
|
|||
proc isFatPointer(ti: PNimType): bool =
|
||||
# This has to be consistent with the code generator!
|
||||
return ti.base.kind notin {tyObject,
|
||||
tyArray, tyArrayConstr, tyPureObject, tyTuple,
|
||||
tyArray, tyArrayConstr, tyTuple,
|
||||
tyOpenArray, tySet, tyVar, tyRef, tyPtr}
|
||||
|
||||
proc NimCopy(x: pointer, ti: PNimType): pointer {.compilerproc.}
|
||||
|
|
@ -439,7 +439,7 @@ proc NimCopy(x: pointer, ti: PNimType): pointer =
|
|||
`result` = {};
|
||||
for (var key in `x`) { `result`[key] = `x`[key]; }
|
||||
"""
|
||||
of tyPureObject, tyTuple, tyObject:
|
||||
of tyTuple, tyObject:
|
||||
if ti.base != nil: result = NimCopy(x, ti.base)
|
||||
elif ti.kind == tyObject:
|
||||
asm "`result` = {m_type: `ti`};"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue