remove noop option gc:v2 (#19810)
* remove noop option gc:v2 * changelog
This commit is contained in:
parent
eefca1b81f
commit
8cde6ba6bc
6 changed files with 7 additions and 18 deletions
|
|
@ -24,6 +24,8 @@ becomes an alias for `addr`.
|
||||||
|
|
||||||
- io is about to move out of system; use `-d:nimPreviewSlimSystem` and import `std/syncio`.
|
- io is about to move out of system; use `-d:nimPreviewSlimSystem` and import `std/syncio`.
|
||||||
|
|
||||||
|
- The `gc:v2` option is removed.
|
||||||
|
|
||||||
## Standard library additions and changes
|
## Standard library additions and changes
|
||||||
|
|
||||||
[//]: # "Changes:"
|
[//]: # "Changes:"
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const
|
||||||
# above X strings a hash-switch for strings is generated
|
# above X strings a hash-switch for strings is generated
|
||||||
|
|
||||||
proc getTraverseProc(p: BProc, v: PSym): Rope =
|
proc getTraverseProc(p: BProc, v: PSym): Rope =
|
||||||
if p.config.selectedGC in {gcMarkAndSweep, gcHooks, gcV2, gcRefc} and
|
if p.config.selectedGC in {gcMarkAndSweep, gcHooks, gcRefc} and
|
||||||
optOwnedRefs notin p.config.globalOptions and
|
optOwnedRefs notin p.config.globalOptions and
|
||||||
containsGarbageCollectedRef(v.loc.t):
|
containsGarbageCollectedRef(v.loc.t):
|
||||||
# we register a specialized marked proc here; this has the advantage
|
# we register a specialized marked proc here; this has the advantage
|
||||||
|
|
|
||||||
|
|
@ -1483,12 +1483,12 @@ proc genTypeInfoV1(m: BModule, t: PType; info: TLineInfo): Rope =
|
||||||
genTupleInfo(m, x, x, result, info)
|
genTupleInfo(m, x, x, result, info)
|
||||||
of tySequence:
|
of tySequence:
|
||||||
genTypeInfoAux(m, t, t, result, info)
|
genTypeInfoAux(m, t, t, result, info)
|
||||||
if m.config.selectedGC in {gcMarkAndSweep, gcRefc, gcV2, gcGo}:
|
if m.config.selectedGC in {gcMarkAndSweep, gcRefc, gcGo}:
|
||||||
let markerProc = genTraverseProc(m, origType, sig)
|
let markerProc = genTraverseProc(m, origType, sig)
|
||||||
m.s[cfsTypeInit3].addf("$1.marker = $2;$n", [tiNameForHcr(m, result), markerProc])
|
m.s[cfsTypeInit3].addf("$1.marker = $2;$n", [tiNameForHcr(m, result), markerProc])
|
||||||
of tyRef:
|
of tyRef:
|
||||||
genTypeInfoAux(m, t, t, result, info)
|
genTypeInfoAux(m, t, t, result, info)
|
||||||
if m.config.selectedGC in {gcMarkAndSweep, gcRefc, gcV2, gcGo}:
|
if m.config.selectedGC in {gcMarkAndSweep, gcRefc, gcGo}:
|
||||||
let markerProc = genTraverseProc(m, origType, sig)
|
let markerProc = genTraverseProc(m, origType, sig)
|
||||||
m.s[cfsTypeInit3].addf("$1.marker = $2;$n", [tiNameForHcr(m, result), markerProc])
|
m.s[cfsTypeInit3].addf("$1.marker = $2;$n", [tiNameForHcr(m, result), markerProc])
|
||||||
of tyPtr, tyRange, tyUncheckedArray: genTypeInfoAux(m, t, t, result, info)
|
of tyPtr, tyRange, tyUncheckedArray: genTypeInfoAux(m, t, t, result, info)
|
||||||
|
|
|
||||||
|
|
@ -262,7 +262,6 @@ proc testCompileOptionArg*(conf: ConfigRef; switch, arg: string, info: TLineInfo
|
||||||
of "go": result = conf.selectedGC == gcGo
|
of "go": result = conf.selectedGC == gcGo
|
||||||
of "none": result = conf.selectedGC == gcNone
|
of "none": result = conf.selectedGC == gcNone
|
||||||
of "stack", "regions": result = conf.selectedGC == gcRegions
|
of "stack", "regions": result = conf.selectedGC == gcRegions
|
||||||
of "v2", "generational": warningOptionNoop(arg)
|
|
||||||
else: localError(conf, info, errNoneBoehmRefcExpectedButXFound % arg)
|
else: localError(conf, info, errNoneBoehmRefcExpectedButXFound % arg)
|
||||||
of "opt":
|
of "opt":
|
||||||
case arg.normalize
|
case arg.normalize
|
||||||
|
|
@ -568,7 +567,6 @@ proc processMemoryManagementOption(switch, arg: string, pass: TCmdLinePass,
|
||||||
unregisterArcOrc(conf)
|
unregisterArcOrc(conf)
|
||||||
conf.selectedGC = gcRegions
|
conf.selectedGC = gcRegions
|
||||||
defineSymbol(conf.symbols, "gcregions")
|
defineSymbol(conf.symbols, "gcregions")
|
||||||
of "v2": warningOptionNoop(arg)
|
|
||||||
else: localError(conf, info, errNoneBoehmRefcExpectedButXFound % arg)
|
else: localError(conf, info, errNoneBoehmRefcExpectedButXFound % arg)
|
||||||
|
|
||||||
proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
|
proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
|
||||||
|
|
|
||||||
|
|
@ -183,7 +183,6 @@ type
|
||||||
gcMarkAndSweep = "markAndSweep"
|
gcMarkAndSweep = "markAndSweep"
|
||||||
gcHooks = "hooks"
|
gcHooks = "hooks"
|
||||||
gcRefc = "refc"
|
gcRefc = "refc"
|
||||||
gcV2 = "v2"
|
|
||||||
gcGo = "go"
|
gcGo = "go"
|
||||||
# gcRefc and the GCs that follow it use a write barrier,
|
# gcRefc and the GCs that follow it use a write barrier,
|
||||||
# as far as usesWriteBarrier() is concerned
|
# as far as usesWriteBarrier() is concerned
|
||||||
|
|
|
||||||
|
|
@ -304,16 +304,6 @@ proc setLengthSeq(seq: PGenericSeq, elemSize, elemAlign, newLen: int): PGenericS
|
||||||
when not defined(boehmGC) and not defined(nogc) and
|
when not defined(boehmGC) and not defined(nogc) and
|
||||||
not defined(gcMarkAndSweep) and not defined(gogc) and
|
not defined(gcMarkAndSweep) and not defined(gogc) and
|
||||||
not defined(gcRegions):
|
not defined(gcRegions):
|
||||||
when false: # deadcode: was used by `compileOption("gc", "v2")`
|
|
||||||
for i in newLen..result.len-1:
|
|
||||||
let len0 = gch.tempStack.len
|
|
||||||
forAllChildrenAux(dataPointer(result, elemAlign, elemSize, i),
|
|
||||||
extGetCellType(result).base, waPush)
|
|
||||||
let len1 = gch.tempStack.len
|
|
||||||
for i in len0 ..< len1:
|
|
||||||
doDecRef(gch.tempStack.d[i], LocalHeap, MaybeCyclic)
|
|
||||||
gch.tempStack.len = len0
|
|
||||||
else:
|
|
||||||
if ntfNoRefs notin extGetCellType(result).base.flags:
|
if ntfNoRefs notin extGetCellType(result).base.flags:
|
||||||
for i in newLen..result.len-1:
|
for i in newLen..result.len-1:
|
||||||
forAllChildrenAux(dataPointer(result, elemAlign, elemSize, i),
|
forAllChildrenAux(dataPointer(result, elemAlign, elemSize, i),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue