From 7e747d11c66405f08cc7c69e5afc18348663275e Mon Sep 17 00:00:00 2001 From: Clyybber Date: Thu, 28 Nov 2019 17:13:04 +0100 Subject: Cosmetic compiler cleanup (#12718) * Cleanup compiler code base * Unify add calls * Unify len invocations * Unify range operators * Fix oversight * Remove {.procvar.} pragma * initCandidate -> newCandidate where reasonable * Unify safeLen calls --- compiler/vmops.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/vmops.nim') diff --git a/compiler/vmops.nim b/compiler/vmops.nim index b46faeb0f..1e3a258f3 100644 --- a/compiler/vmops.nim +++ b/compiler/vmops.nim @@ -91,7 +91,7 @@ template wrapDangerous(op, modop) {.dirty.} = proc getCurrentExceptionMsgWrapper(a: VmArgs) {.nimcall.} = setResult(a, if a.currentException.isNil: "" - else: a.currentException.sons[3].skipColon.strVal) + else: a.currentException[3].skipColon.strVal) proc getCurrentExceptionWrapper(a: VmArgs) {.nimcall.} = setResult(a, a.currentException) @@ -191,7 +191,7 @@ proc registerAdditionalOps*(c: PCtx) = let ePos = a.getInt(2).int let arr = a.getNode(0) var bytes = newSeq[byte](arr.len) - for i in 0 ..< arr.len: + for i in 0..