diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/system/assign.nim | 6 | ||||
-rwxr-xr-x | lib/system/gc.nim | 2 | ||||
-rwxr-xr-x | lib/system/hti.nim | 5 | ||||
-rwxr-xr-x | lib/system/repr.nim | 4 |
4 files changed, 8 insertions, 9 deletions
diff --git a/lib/system/assign.nim b/lib/system/assign.nim index 464dfb36c..9ba8cf614 100755 --- a/lib/system/assign.nim +++ b/lib/system/assign.nim @@ -62,7 +62,7 @@ proc genericAssignAux(dest, src: Pointer, mt: PNimType, shallow: bool) = var dstseq = cast[PGenericSeq](dst) dstseq.len = seq.len dstseq.space = seq.len - of tyObject, tyTuple, tyPureObject: + of tyObject, tyTuple: # we don't need to copy m_type field for tyObject, as they are equal anyway genericAssignAux(dest, src, mt.node, shallow) of tyArray, tyArrayConstr: @@ -121,7 +121,7 @@ proc objectInit(dest: Pointer, typ: PNimType) = var pint = cast[ptr PNimType](dest) pint[] = typ objectInitAux(dest, typ.node) - of tyTuple, tyPureObject: + of tyTuple: objectInitAux(dest, typ.node) of tyArray, tyArrayConstr: for i in 0..(typ.size div typ.base.size)-1: @@ -149,7 +149,7 @@ proc genericReset(dest: Pointer, mt: PNimType) = case mt.Kind of tyString, tyRef, tySequence: unsureAsgnRef(cast[ppointer](dest), nil) - of tyObject, tyTuple, tyPureObject: + of tyObject, tyTuple: # we don't need to reset m_type field for tyObject genericResetAux(dest, mt.node) of tyArray, tyArrayConstr: diff --git a/lib/system/gc.nim b/lib/system/gc.nim index d1fa98514..9e0e88612 100755 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -301,7 +301,7 @@ proc forAllChildrenAux(dest: Pointer, mt: PNimType, op: TWalkOp) = case mt.Kind of tyRef, tyString, tySequence: # leaf: doOperation(cast[ppointer](d)[], op) - of tyObject, tyTuple, tyPureObject: + of tyObject, tyTuple: forAllSlotsAux(dest, mt.node, op) of tyArray, tyArrayConstr, tyOpenArray: for i in 0..(mt.size div mt.base.size)-1: diff --git a/lib/system/hti.nim b/lib/system/hti.nim index c5b6967ef..ff669be18 100755 --- a/lib/system/hti.nim +++ b/lib/system/hti.nim @@ -27,7 +27,7 @@ type # This should be he same as ast.TTypeKind tyOrdinal, tyArray, tyObject, - tyTuple, + tyTuple, # WARNING: The compiler uses tyTuple for pure objects! tySet, tyRange, tyPtr, tyRef, @@ -37,8 +37,7 @@ type # This should be he same as ast.TTypeKind tyPointer, tyOpenArray, tyString, tyCString, tyForward, tyInt, tyInt8, tyInt16, tyInt32, tyInt64, - tyFloat, tyFloat32, tyFloat64, tyFloat128, - tyPureObject # signals that object has no `n_type` field + tyFloat, tyFloat32, tyFloat64, tyFloat128 TNimNodeKind = enum nkNone, nkSlot, nkList, nkCase TNimNode {.codegenType, final.} = object diff --git a/lib/system/repr.nim b/lib/system/repr.nim index 6b940ccb4..82bc8aace 100755 --- a/lib/system/repr.nim +++ b/lib/system/repr.nim @@ -201,7 +201,7 @@ when not defined(useNimRtl): case typ.kind of tySet: reprSetAux(result, p, typ) of tyArray: reprArray(result, p, typ, cl) - of tyTuple, tyPureObject: reprRecord(result, p, typ, cl) + of tyTuple: reprRecord(result, p, typ, cl) of tyObject: var t = cast[ptr PNimType](p)[] reprRecord(result, p, t, cl) @@ -251,7 +251,7 @@ when not defined(useNimRtl): cl: TReprClosure initReprClosure(cl) result = "" - if typ.kind in {tyObject, tyPureObject, tyTuple, tyArray, tySet}: + if typ.kind in {tyObject, tyTuple, tyArray, tySet}: reprAux(result, p, typ, cl) else: var p = p |