Use openarray of bytes in md5 (#19307)

* Use openarray of bytes in md5
* fix CI
* cleanup
* use noSideEffect for bootstrapping
* fix CI again
* actually fix CI by checking if it works
* this is getting ridiculous
* put old md5 version in compiler, remove vmop
This commit is contained in:
hlaaftana 2022-01-15 15:19:05 +03:00 • committed by GitHub
commit a95399143f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 413 additions and 51 deletions

View file

@ -25,7 +25,6 @@ when declared(math.signbit):
from std/os import getEnv, existsEnv, delEnv, putEnv, envPairs,
dirExists, fileExists, walkDir, getAppFilename, raiseOSError, osLastError
from std/md5 import getMD5
from std/times import cpuTime
from std/hashes import hash
from std/osproc import nil
@ -53,9 +52,6 @@ template ioop(op) {.dirty.} =
template macrosop(op) {.dirty.} =
registerCallback(c, "stdlib.macros." & astToStr(op), `op Wrapper`)
template md5op(op) {.dirty.} =
registerCallback(c, "stdlib.md5." & astToStr(op), `op Wrapper`)
template wrap1f_math(op) {.dirty.} =
proc `op Wrapper`(a: VmArgs) {.nimcall.} =
doAssert a.numArgs == 1
@ -212,8 +208,6 @@ proc registerAdditionalOps*(c: PCtx) =
of 2: setResult(a, round(getFloat(a, 0), getInt(a, 1).int))
else: doAssert false, $n
wrap1s(getMD5, md5op)
proc `mod Wrapper`(a: VmArgs) {.nimcall.} =
setResult(a, `mod`(getFloat(a, 0), getFloat(a, 1)))
registerCallback(c, "stdlib.math.mod", `mod Wrapper`)