summary refs log tree commit diff stats
path: root/lib/pure/bitops.nim
Commit message (Collapse)AuthorAgeFilesLines
* remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ↵Timothee Cour2021-02-171-295/+294
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#16918) * nimNoArrayToCstringConversion deadcode * nimbabel deadcode * nimHasalignOf deadcode * nimvarargstyped deadcode * nimhygiene deadcode * nimNewTypedesc deadcode * nimlocks deadcode * nimHasCppDefine deadcode * nimHasRunnableExamples deadcode * nimHasNilChecks deadcode * nimSymKind deadcode * minor macros refactoring * nimVmEqIdent deadcode * nimNoNil deadcode * nimNoZeroTerminator deadcode * nimHasSymOwnerInMacro deadcode * nimVmExportFixed deadcode * nimNewRuntime deadcode * nimAshr deadcode * nimUncheckedArrayTyp deadcode * nimHasTypeof deadcode * nimErrorProcCanHaveBody deadcode * nimHasHotCodeReloading deadcode * nimHasSignatureHashInMacro deadcode * nimHasDefault deadcode * nimMacrosSizealignof deadcode
* Improve documentation for bitops (#16961)konsumlamm2021-02-151-128/+131
| | | | | | | | | | * Improve documentation for bitops Use func Use let in runnableExamples * Remove unnecessary tests Fix #7587
* Refactoring `bitops.rotateLeftBits()` and `bitops.rotateRightBits()`; adding ↵rockcavera2021-02-081-65/+223
| | | | | builtins and intrinsics. (#16622) Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* adding missing commas in std/bitops (#16520)rockcavera2020-12-301-5/+5
| | | adding missing commas between the importc and header pragmas of some procs.
* init checks and 'out' parameters (#14521)Andreas Rumpf2020-06-231-0/+2
| | | | | | | | | | | * I don't care about observable stores * enforce explicit initializations * cleaner code for the stdlib * stdlib: use explicit initializations * make tests green * algorithm.nim: set result explicitly * remove out parameters and bring the PR into a mergable state * updated the changelog
* Fix runnable examples for bitops (#14247)awr12020-05-061-3/+3
|
* Added bitslice operations for bitops (#14016)awr12020-05-061-21/+206
| | | | | | | | | | | | | | | | | | | | * added bit operations based on bit slices, clarified documentation, made non-mutating versions of mask ops * Added since annotations, some runnable examples * Added mask()/masked() functions, changed internal workings of mask ops to use new bit* funcs * Changelog updated for new bitops improvements * Reorganization, added runnable examples * Documentation adjustments * Add incltrl for since annotation * Fix masked() impl * Fix mask() return type * Don't call toUnsigned on already unsigned types * Remove improper `var T` for flipMasked() * Fix return types for flipMasked() * Slight syntactic cleanup for *masked ops * Added tests for bitslice operations, new mask() operation, non-mutating mask ops * Fix setmasked() var T issue * More comprehensive tests * Fix runnable example for bitsliced() * Fix runnable example for mask()
* Make bitand, bitor, bitxor varargs-friendly (#13985)awr12020-04-201-9/+26
| | | | | | | | * made bitand, bitor, bitxor varargs friendly * changed new bitops to macros * changed macro signature for consistency (this technically doesn't matter) * added tests * removed redundant assert * fix literal
* Add runnableExamples to bitops module (#13951)jiro2020-04-131-15/+143
| | | | | | | | | | | | | | | | | * doc: bitops: add runnableExamples * doc: bitops: add notes to documentation comments of macros * doc: bitops: add periods to documentation comments * doc: bitops: add static * Revert "doc: bitops: add static" This reverts commit 595ee134abcd451e73ddde963c1b3e49a275f2e5. * doc: bitops: add `var` to arguments of macros * doc: bitops: remove examples of testBit
* fix several typos in documentation and comments (#12553)Nindaleth2019-10-301-1/+1
|
* [backport] run nimpretty on os-related stuffnarimiran2019-09-301-32/+47
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-48/+48
| | | | --styleCheck:error
* Bit operator names 2 (#11413)Arne Döring2019-06-061-0/+11
| | | | | | * add bit operator names * add test for bitop alias
* Enable range checking for unsigned integers (#11313)Oscar Nihlgård2019-05-251-0/+18
| | | | | | * Enable range checking for unsigned integers * Make the tests green
* code cleanup (#10874)Arne Döring2019-03-281-18/+6
|
* bitops: add reverseBits and test (#10835)Tomohiro2019-03-131-0/+45
|
* Remove varsilent-observer2019-03-051-1/+1
| | | Shouldn't testing bit require only immutable access? I think this is a typo
* Vm bitops fixes (#10520)Arne Döring2019-02-051-10/+17
|
* Added basic bit manipulation procs to bitops (#10338)Ico Doornekamp2019-01-231-1/+59
|
* bitops: add 'hamming weight' to the doc indexAraq2017-12-031-1/+1
|
* add bitops module for optimized bit manipulation. (#5201)Parashurama2017-03-141-0/+383