diff options
author | Araq <rumpf_a@web.de> | 2014-12-10 19:59:14 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-12-10 19:59:14 +0100 |
commit | d3cf767c3acb8a3c202eab7c4133a81273b61a36 (patch) | |
tree | a5d3a81e069c374a5b2a96555608e1ec21d2f905 | |
parent | 6fa4809bd9ecbee634fbe9b0ae514c06f86caf7b (diff) | |
download | Nim-d3cf767c3acb8a3c202eab7c4133a81273b61a36.tar.gz |
fixes #1692
-rw-r--r-- | compiler/vm.nim | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index 3d2ddfc82..fe67f4d4c 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -7,7 +7,7 @@ # distribution, for details about the copyright. # -## This file implements the new evaluation engine for Nimrod code. +## This file implements the new evaluation engine for Nim code. ## An instruction is 1-3 int32s in memory, it is a register based VM. const debugEchoCode = false @@ -1151,7 +1151,8 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = let ast = parseString(regs[rb].node.strVal, c.debug[pc].toFullPath, c.debug[pc].line.int, proc (info: TLineInfo; msg: TMsgKind; arg: string) = - if error.isNil: error = formatMsg(info, msg, arg)) + if error.isNil and msg <= msgs.errMax: + error = formatMsg(info, msg, arg)) if not error.isNil: c.errorFlag = error elif sonsLen(ast) != 1: @@ -1164,7 +1165,8 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = let ast = parseString(regs[rb].node.strVal, c.debug[pc].toFullPath, c.debug[pc].line.int, proc (info: TLineInfo; msg: TMsgKind; arg: string) = - if error.isNil: error = formatMsg(info, msg, arg)) + if error.isNil and msg <= msgs.errMax: + error = formatMsg(info, msg, arg)) if not error.isNil: c.errorFlag = error else: |