remove conditionals on nimHasUserErrors, nimNoNilSeqs2, nimNoNilSeqs (#16861)

* cleanup docs for type(nil) | type(nil); simplify nimHasUserErrors

* simplify nimNoNilSeqs2

* simplify nimNoNilSeqs

* fixup
This commit is contained in:
Timothee Cour 2021-01-29 05:30:24 -08:00 • committed by GitHub
commit 6e267d28b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 29 additions and 93 deletions

View file

@ -271,8 +271,6 @@ template getstr(a: untyped): untyped =
(if a.kind == rkNode: a.node.strVal else: $chr(int(a.intVal)))
proc pushSafePoint(f: PStackFrame; pc: int) =
when not defined(nimNoNilSeqs):
if f.safePoints.isNil: f.safePoints = @[]
f.safePoints.add(pc)
proc popSafePoint(f: PStackFrame) =
@ -2092,8 +2090,6 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
inc pc
let typ = c.types[c.code[pc].regBx - wordExcess]
createStrKeepNode(regs[ra])
when not defined(nimNoNilSeqs):
if regs[ra].node.strVal.isNil: regs[ra].node.strVal = newStringOfCap(1000)
storeAny(regs[ra].node.strVal, typ, regs[rb].regToNode, c.config)
c.profiler.leave(c)