mirror of
https://github.com/status-im/nim-stint.git
synced 2025-02-16 08:57:18 +00:00
remove Nim 1.2 and 1.4 support
This commit is contained in:
parent
86621eced1
commit
95b91474ce
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -22,7 +22,7 @@ jobs:
|
||||
cpu: amd64
|
||||
#- os: windows
|
||||
#cpu: i386
|
||||
branch: [version-1-2, version-1-4, version-1-6, version-2-0, devel]
|
||||
branch: [version-1-6, version-2-0, devel]
|
||||
include:
|
||||
- target:
|
||||
os: linux
|
||||
|
@ -7,21 +7,16 @@ skipDirs = @["tests", "benchmarks"]
|
||||
### Dependencies
|
||||
|
||||
# TODO test only requirements don't work: https://github.com/nim-lang/nimble/issues/482
|
||||
requires "nim >= 1.2.0",
|
||||
requires "nim >= 1.6.0",
|
||||
"stew"
|
||||
#, "https://github.com/alehander42/nim-quicktest >= 0.18.0", "https://github.com/status-im/nim-ttmath"
|
||||
|
||||
proc test(args, path: string) =
|
||||
if not dirExists "build":
|
||||
mkDir "build"
|
||||
let styleCheckStyle =
|
||||
if (NimMajor, NimMinor) < (1, 6):
|
||||
"hint"
|
||||
else:
|
||||
"error"
|
||||
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " & args &
|
||||
" --outdir:build -r --hints:off --warnings:off --skipParentCfg" &
|
||||
" --styleCheck:usages --styleCheck:" & styleCheckStyle & " " & path
|
||||
" --styleCheck:usages --styleCheck:error " & path
|
||||
if (NimMajor, NimMinor) > (1, 6):
|
||||
exec "nim " & getEnv("TEST_LANG", "c") & " " & getEnv("NIMFLAGS") & " " & args &
|
||||
" --outdir:build -r --mm:refc --hints:off --warnings:off --skipParentCfg" &
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Stint
|
||||
# Copyright 2018 Status Research & Development GmbH
|
||||
# Copyright 2018-2023 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
#
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
@ -11,9 +11,6 @@ import
|
||||
./datatypes, ./conversion, ./int_comparison,
|
||||
./uint_addsub, ./uint_comparison
|
||||
|
||||
# TODO remove when stint removes Nim 1.2 support
|
||||
import stew/shims/stddefects
|
||||
|
||||
func `+`*(x, y: IntImpl): IntImpl {.inline.}=
|
||||
# Addition for multi-precision signed int.
|
||||
type SubTy = type x.hi
|
||||
|
@ -1,5 +1,5 @@
|
||||
# Stint
|
||||
# Copyright 2018 Status Research & Development GmbH
|
||||
# Copyright 2018-2023 Status Research & Development GmbH
|
||||
# Licensed under either of
|
||||
#
|
||||
# * Apache License, version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
|
||||
@ -229,9 +229,6 @@ func divmodBS(x, y: UintImpl, q, r: var UintImpl) =
|
||||
const BinaryShiftThreshold = 8 # If the difference in bit-length is below 8
|
||||
# binary shift is probably faster
|
||||
|
||||
# TODO remove when stint removes Nim 1.2 support
|
||||
import stew/shims/stddefects
|
||||
|
||||
func divmod*[T](x, y: UintImpl[T]): tuple[quot, rem: UintImpl[T]]=
|
||||
|
||||
let x_clz = x.leadingZeros
|
||||
|
@ -179,9 +179,8 @@ template testIO(chk, tst: untyped) =
|
||||
nativeStuint(chk, low(uint), 32)
|
||||
nativeStuint(chk, high(int), 32)
|
||||
else:
|
||||
when (NimMajor, NimMinor, NimPatch) >= (1, 0, 0):
|
||||
nativeStuint(chk, high(uint), 64)
|
||||
nativeStuint(chk, low(uint), 64)
|
||||
nativeStuint(chk, high(uint), 64)
|
||||
nativeStuint(chk, low(uint), 64)
|
||||
nativeStuint(chk, high(int), 64)
|
||||
|
||||
nativeStuint(chk, 0, 128)
|
||||
|
Loading…
x
Reference in New Issue
Block a user