Add missing nilChecks compiling option (#6480)
This commit is contained in:
parent
d55e02ddf1
commit
5c1a842b88
3 changed files with 5 additions and 0 deletions
|
|
@ -251,6 +251,7 @@ proc testCompileOption*(switch: string, info: TLineInfo): bool =
|
||||||
result = gOptions * {optNaNCheck, optInfCheck} == {optNaNCheck, optInfCheck}
|
result = gOptions * {optNaNCheck, optInfCheck} == {optNaNCheck, optInfCheck}
|
||||||
of "infchecks": result = contains(gOptions, optInfCheck)
|
of "infchecks": result = contains(gOptions, optInfCheck)
|
||||||
of "nanchecks": result = contains(gOptions, optNaNCheck)
|
of "nanchecks": result = contains(gOptions, optNaNCheck)
|
||||||
|
of "nilchecks": result = contains(gOptions, optNilCheck)
|
||||||
of "objchecks": result = contains(gOptions, optObjCheck)
|
of "objchecks": result = contains(gOptions, optObjCheck)
|
||||||
of "fieldchecks": result = contains(gOptions, optFieldCheck)
|
of "fieldchecks": result = contains(gOptions, optFieldCheck)
|
||||||
of "rangechecks": result = contains(gOptions, optRangeCheck)
|
of "rangechecks": result = contains(gOptions, optRangeCheck)
|
||||||
|
|
@ -473,6 +474,7 @@ proc processSwitch(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
|
||||||
processOnOffSwitch({optNaNCheck, optInfCheck}, arg, pass, info)
|
processOnOffSwitch({optNaNCheck, optInfCheck}, arg, pass, info)
|
||||||
of "infchecks": processOnOffSwitch({optInfCheck}, arg, pass, info)
|
of "infchecks": processOnOffSwitch({optInfCheck}, arg, pass, info)
|
||||||
of "nanchecks": processOnOffSwitch({optNaNCheck}, arg, pass, info)
|
of "nanchecks": processOnOffSwitch({optNaNCheck}, arg, pass, info)
|
||||||
|
of "nilchecks": processOnOffSwitch({optNilCheck}, arg, pass, info)
|
||||||
of "objchecks": processOnOffSwitch({optObjCheck}, arg, pass, info)
|
of "objchecks": processOnOffSwitch({optObjCheck}, arg, pass, info)
|
||||||
of "fieldchecks": processOnOffSwitch({optFieldCheck}, arg, pass, info)
|
of "fieldchecks": processOnOffSwitch({optFieldCheck}, arg, pass, info)
|
||||||
of "rangechecks": processOnOffSwitch({optRangeCheck}, arg, pass, info)
|
of "rangechecks": processOnOffSwitch({optRangeCheck}, arg, pass, info)
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ Options:
|
||||||
--floatChecks:on|off turn all floating point (NaN/Inf) checks on|off
|
--floatChecks:on|off turn all floating point (NaN/Inf) checks on|off
|
||||||
--nanChecks:on|off turn NaN checks on|off
|
--nanChecks:on|off turn NaN checks on|off
|
||||||
--infChecks:on|off turn Inf checks on|off
|
--infChecks:on|off turn Inf checks on|off
|
||||||
|
--nilChecks:on|off turn nil checks on|off
|
||||||
--deadCodeElim:on|off whole program dead code elimination on|off
|
--deadCodeElim:on|off whole program dead code elimination on|off
|
||||||
--opt:none|speed|size optimize not at all or for speed|size
|
--opt:none|speed|size optimize not at all or for speed|size
|
||||||
Note: use -d:release for a release build!
|
Note: use -d:release for a release build!
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,8 @@ _nim() {
|
||||||
'*--nanChecks=off[turn NaN checks off]' \
|
'*--nanChecks=off[turn NaN checks off]' \
|
||||||
'*--infChecks=on[turn Inf checks on]' \
|
'*--infChecks=on[turn Inf checks on]' \
|
||||||
'*--infChecks=off[turn Inf checks off]' \
|
'*--infChecks=off[turn Inf checks off]' \
|
||||||
|
'*--nilChecks=on[turn nil checks on]' \
|
||||||
|
'*--nilChecks=off[turn nil checks off]' \
|
||||||
'*--deadCodeElim=on[whole program dead code elimination on]' \
|
'*--deadCodeElim=on[whole program dead code elimination on]' \
|
||||||
'*--deadCodeElim=off[whole program dead code elimination off]' \
|
'*--deadCodeElim=off[whole program dead code elimination off]' \
|
||||||
'*--opt=none[do not optimize]' \
|
'*--opt=none[do not optimize]' \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue