Clean up some more deprecation warnings

This commit is contained in:
def 2015-02-16 19:13:49 +01:00
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: of tyArray, tyArrayConstr, tyOpenArray:
for i in 0..(mt.size div mt.base.size)-1: for i in 0..(mt.size div mt.base.size)-1:
forAllChildrenAux(cast[pointer](d +% i *% mt.base.size), mt.base, op) forAllChildrenAux(cast[pointer](d +% i *% mt.base.size), mt.base, op)
else: nil else: discard
proc forAllChildren(cell: PCell, op: TWalkOp) = proc forAllChildren(cell: PCell, op: TWalkOp) =
sysAssert(cell != nil, "forAllChildren: 1") sysAssert(cell != nil, "forAllChildren: 1")
@ -547,7 +547,7 @@ proc forAllChildren(cell: PCell, op: TWalkOp) =
for i in 0..s.len-1: for i in 0..s.len-1:
forAllChildrenAux(cast[pointer](baseAddr +% i *% cell.typ.base.size), forAllChildrenAux(cast[pointer](baseAddr +% i *% cell.typ.base.size),
cell.typ.base, op) cell.typ.base, op)
else: nil else: discard
proc addNewObjToZCT(res: PCell, gch: var TGcHeap) {.inline.} = proc addNewObjToZCT(res: PCell, gch: var TGcHeap) {.inline.} =
# we check the last 8 entries (cache line) for a slot that could be reused. # 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) = proc GC_setStrategy(strategy: GC_Strategy) =
case strategy case strategy
of gcThroughput: nil of gcThroughput: discard
of gcResponsiveness: nil of gcResponsiveness: discard
of gcOptimizeSpace: nil of gcOptimizeSpace: discard
of gcOptimizeTime: nil of gcOptimizeTime: discard
proc GC_enableMarkAndSweep() = proc GC_enableMarkAndSweep() =
gch.cycleThreshold = InitialCycleThreshold gch.cycleThreshold = InitialCycleThreshold

View file

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