diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-02-10 17:03:16 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-02-10 17:03:32 +0100 |
commit | f0e6becc235c15709ef84598f52c765687941056 (patch) | |
tree | 6caa4d5f185690fa5519ee31684bc703675cac37 /compiler | |
parent | d46a590f7463a44865f0ec4129a3ddee219ede36 (diff) | |
download | Nim-f0e6becc235c15709ef84598f52c765687941056.tar.gz |
fixes #10547
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/vm.nim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/compiler/vm.nim b/compiler/vm.nim index f855da0cc..fd1df3ce9 100644 --- a/compiler/vm.nim +++ b/compiler/vm.nim @@ -1429,7 +1429,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = of opcNGetType: let rb = instr.regB let rc = instr.regC - case rc: + case rc of 0: # getType opcode: ensureKind(rkNode) @@ -1471,7 +1471,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = createStr regs[ra] let a = regs[rb].node case a.kind - of {nkStrLit..nkTripleStrLit}: + of nkStrLit..nkTripleStrLit: regs[ra].node.strVal = a.strVal of nkCommentStmt: regs[ra].node.strVal = a.comment @@ -1573,7 +1573,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = var bStrVal: cstring = nil # extract strVal from argument ``a`` case aNode.kind - of {nkStrLit..nkTripleStrLit}: + of nkStrLit..nkTripleStrLit: aStrVal = aNode.strVal.cstring of nkIdent: aStrVal = aNode.ident.s.cstring @@ -1585,7 +1585,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = discard # extract strVal from argument ``b`` case bNode.kind - of {nkStrLit..nkTripleStrLit}: + of nkStrLit..nkTripleStrLit: bStrVal = bNode.strVal.cstring of nkIdent: bStrVal = bNode.ident.s.cstring @@ -1598,7 +1598,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg = # set result regs[ra].intVal = if aStrVal != nil and bStrVal != nil: - ord(idents.cmpIgnoreStyle(aStrVal,bStrVal,high(int)) == 0) + ord(idents.cmpIgnoreStyle(aStrVal, bStrVal, high(int)) == 0) else: 0 @@ -1948,6 +1948,7 @@ const evalPass* = makePass(myOpen, myProcess, myClose) proc evalConstExprAux(module: PSym; g: ModuleGraph; prc: PSym, n: PNode, mode: TEvalMode): PNode = + if g.config.errorCounter > 0: return n let n = transformExpr(g, module, n, noDestructors = true) setupGlobalCtx(module, g) var c = PCtx g.vm |