summary refs log tree commit diff stats
path: root/compiler/vmops.nim
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2019-11-28 17:13:04 +0100
committerAndreas Rumpf <rumpf_a@web.de>2019-11-28 17:13:04 +0100
commit7e747d11c66405f08cc7c69e5afc18348663275e (patch)
treed6277a88b503ddd503d8b769bdae6c72fcf3d27b /compiler/vmops.nim
parentb662842bd04852a751993ed506f9e38155a4e4aa (diff)
downloadNim-7e747d11c66405f08cc7c69e5afc18348663275e.tar.gz
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
Diffstat (limited to 'compiler/vmops.nim')
-rw-r--r--compiler/vmops.nim4
1 files changed, 2 insertions, 2 deletions
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..<arr.len:
       bytes[i] = byte(arr[i].intVal and 0xff)
 
     var res = hashes.hash(bytes, sPos, ePos)