diff options
author | Araq <rumpf_a@web.de> | 2018-03-18 11:04:53 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-03-18 11:04:53 +0100 |
commit | 4301744e49f4b3758cc7a777c2d78c827bfbb344 (patch) | |
tree | b5b3301d05c8c1ab7efb81bdb7bd92d9140ea5bd | |
parent | e39f2a9283fc63f529d74acb0d50b0035d513e79 (diff) | |
download | Nim-4301744e49f4b3758cc7a777c2d78c827bfbb344.tar.gz |
raise the max instruction count for the VM to one billion
-rw-r--r-- | changelog.md | 4 | ||||
-rw-r--r-- | compiler/msgs.nim | 4 | ||||
-rw-r--r-- | compiler/vmdef.nim | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/changelog.md b/changelog.md index 6844d3791..77a01b9c7 100644 --- a/changelog.md +++ b/changelog.md @@ -27,6 +27,10 @@ ### Compiler changes +- The VM's instruction count limit was raised to 1 billion instructions in order + to support more complex computations at compile-time. + + ### Bugfixes - The `importcpp` pragma now allows importing the listed fields of generic diff --git a/compiler/msgs.nim b/compiler/msgs.nim index ac4242e67..09413128b 100644 --- a/compiler/msgs.nim +++ b/compiler/msgs.nim @@ -357,7 +357,9 @@ const errXExpectsTwoArguments: "\'$1\' expects two arguments", errXExpectsObjectTypes: "\'$1\' expects object types", errXcanNeverBeOfThisSubtype: "\'$1\' can never be of this subtype", - errTooManyIterations: "interpretation requires too many iterations", + errTooManyIterations: "interpretation requires too many iterations; " & + "if you are sure this is not a bug in your code edit " & + "compiler/vmdef.MaxLoopIterations and rebuild the compiler", errCannotInterpretNodeX: "cannot evaluate \'$1\'", errFieldXNotFound: "field \'$1\' cannot be found", errInvalidConversionFromTypeX: "invalid conversion from type \'$1\'", diff --git a/compiler/vmdef.nim b/compiler/vmdef.nim index 5395d4bad..dd4bc5060 100644 --- a/compiler/vmdef.nim +++ b/compiler/vmdef.nim @@ -16,7 +16,7 @@ const byteExcess* = 128 # we use excess-K for immediates wordExcess* = 32768 - MaxLoopIterations* = 1500_000 # max iterations of all loops + MaxLoopIterations* = 1_000_000_000 # max iterations of all loops type |