more fixes to get rid of tyPureObject

This commit is contained in:
Araq 2011-09-24 11:50:46 +02:00
commit 92543a3037
4 changed files with 8 additions and 8 deletions

View file

@ -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:

View file

@ -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`};"