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
This commit is contained in:
parent
b662842bd0
commit
7e747d11c6
109 changed files with 6115 additions and 6254 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue