Clean up some more deprecation warnings

This commit is contained in:
def
2015-02-16 19:13:49 +01:00
parent a5d22a9534
commit b9abeff617
2 changed files with 7 additions and 7 deletions

View File

@@ -526,7 +526,7 @@ proc forAllChildrenAux(dest: pointer, mt: PNimType, op: TWalkOp) =
of tyArray, tyArrayConstr, tyOpenArray:
for i in 0..(mt.size div mt.base.size)-1:
forAllChildrenAux(cast[pointer](d +% i *% mt.base.size), mt.base, op)
else: nil
else: discard
proc forAllChildren(cell: PCell, op: TWalkOp) =
sysAssert(cell != nil, "forAllChildren: 1")
@@ -547,7 +547,7 @@ proc forAllChildren(cell: PCell, op: TWalkOp) =
for i in 0..s.len-1:
forAllChildrenAux(cast[pointer](baseAddr +% i *% cell.typ.base.size),
cell.typ.base, op)
else: nil
else: discard
proc addNewObjToZCT(res: PCell, gch: var TGcHeap) {.inline.} =
# we check the last 8 entries (cache line) for a slot that could be reused.
@@ -1348,10 +1348,10 @@ when not defined(useNimRtl):
proc GC_setStrategy(strategy: GC_Strategy) =
case strategy
of gcThroughput: nil
of gcResponsiveness: nil
of gcOptimizeSpace: nil
of gcOptimizeTime: nil
of gcThroughput: discard
of gcResponsiveness: discard
of gcOptimizeSpace: discard
of gcOptimizeTime: discard
proc GC_enableMarkAndSweep() =
gch.cycleThreshold = InitialCycleThreshold

View File

@@ -208,7 +208,7 @@ proc setLengthSeq(seq: PGenericSeq, elemSize, newLen: int): PGenericSeq {.
when compileOption("gc", "v2"):
for i in newLen..result.len-1:
let len0 = gch.tempStack.len
forAllChildrenAux(cast[pointer](cast[TAddress](result) +%
forAllChildrenAux(cast[pointer](cast[ByteAddress](result) +%
GenericSeqSize +% (i*%elemSize)),
extGetCellType(result).base, waPush)
let len1 = gch.tempStack.len