VM: allow overriding MaxLoopIterations without rebuilding nim (#13233)

This commit is contained in:
Timothee Cour 2020-01-23 01:53:30 -08:00 • committed by Andreas Rumpf
commit b462baed65
6 changed files with 13 additions and 10 deletions

View file

@ -235,6 +235,7 @@ type
hintCounter*: int
warnCounter*: int
errorMax*: int
maxLoopIterationsVM*: int ## VM: max iterations of all loops
configVars*: StringTableRef
symbols*: StringTableRef ## We need to use a StringTableRef here as defined
## symbols are always guaranteed to be style
@ -380,7 +381,8 @@ proc newConfigRef*(): ConfigRef =
ccompilerpath: "",
toCompile: @[],
arguments: "",
suggestMaxResults: 10_000
suggestMaxResults: 10_000,
maxLoopIterationsVM: 10_000_000,
)
setTargetFromSystem(result.target)
# enable colors by default on terminals