moderate system cleanup & refactor (#20355)
* system refactor, move out 600 lines * compilation, slice, backwardsindex, misc_num moved out of system * some procs/types moved into arithmetics, basic_types * system no longer depends on syncio * some procs moved around to fit with their surroundings * make exceptions an import, old ops to misc_num * move instantiationInfo back * move back nim version, fix windows echo * include compilation * better docs for imported modules, fix unsigned ops also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem * fix terminal * workaround IC test & weird csize bug, changelog * move NimMajor etc back to compilation, rebase for CI * try ic fix * form single `indices`, slim out TaintedString, try fix IC * fix CI, update changelog, addQuitProc * fix CI * try fix CI * actually fix CI finally hopefully * Update lib/system/compilation.nim Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com> * update kochdocs * hopefully fix csize uses for slimsystem * fix tquit Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
This commit is contained in:
parent
b463c8aedf
commit
919a889ba8
37 changed files with 1167 additions and 1102 deletions
|
|
@ -206,6 +206,14 @@ proc `==`*(x, y: uint16): bool {.magic: "EqI", noSideEffect.}
|
|||
proc `==`*(x, y: uint32): bool {.magic: "EqI", noSideEffect.}
|
||||
proc `==`*(x, y: uint64): bool {.magic: "EqI", noSideEffect.}
|
||||
|
||||
proc `<=`*(x, y: float32): bool {.magic: "LeF64", noSideEffect.}
|
||||
proc `<=`*(x, y: float): bool {.magic: "LeF64", noSideEffect.}
|
||||
|
||||
proc `<`*(x, y: float32): bool {.magic: "LtF64", noSideEffect.}
|
||||
proc `<`*(x, y: float): bool {.magic: "LtF64", noSideEffect.}
|
||||
|
||||
proc `==`*(x, y: float32): bool {.magic: "EqF64", noSideEffect.}
|
||||
proc `==`*(x, y: float): bool {.magic: "EqF64", noSideEffect.}
|
||||
|
||||
{.push stackTrace: off.}
|
||||
|
||||
|
|
@ -220,6 +228,13 @@ proc min*(x, y: int32): int32 {.magic: "MinI", noSideEffect.} =
|
|||
proc min*(x, y: int64): int64 {.magic: "MinI", noSideEffect.} =
|
||||
## The minimum value of two integers.
|
||||
if x <= y: x else: y
|
||||
proc min*(x, y: float32): float32 {.noSideEffect, inline.} =
|
||||
if x <= y or y != y: x else: y
|
||||
proc min*(x, y: float64): float64 {.noSideEffect, inline.} =
|
||||
if x <= y or y != y: x else: y
|
||||
proc min*[T: not SomeFloat](x, y: T): T {.inline.} =
|
||||
## Generic minimum operator of 2 values based on `<=`.
|
||||
if x <= y: x else: y
|
||||
|
||||
proc max*(x, y: int): int {.magic: "MaxI", noSideEffect.} =
|
||||
if y <= x: x else: y
|
||||
|
|
@ -232,6 +247,13 @@ proc max*(x, y: int32): int32 {.magic: "MaxI", noSideEffect.} =
|
|||
proc max*(x, y: int64): int64 {.magic: "MaxI", noSideEffect.} =
|
||||
## The maximum value of two integers.
|
||||
if y <= x: x else: y
|
||||
proc max*(x, y: float32): float32 {.noSideEffect, inline.} =
|
||||
if y <= x or y != y: x else: y
|
||||
proc max*(x, y: float64): float64 {.noSideEffect, inline.} =
|
||||
if y <= x or y != y: x else: y
|
||||
proc max*[T: not SomeFloat](x, y: T): T {.inline.} =
|
||||
## Generic maximum operator of 2 values based on `<=`.
|
||||
if y <= x: x else: y
|
||||
|
||||
|
||||
proc min*[T](x: openArray[T]): T =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue