| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
follow up https://github.com/nim-lang/Nim/pull/22851
follow up https://github.com/nim-lang/Nim/pull/22873
|
| |
|
|
|
|
|
|
|
| |
(#22722)
…in typeMasked
fixes #22687
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* std/bitops: Add explicit type masking for the JS target
Typecasts on the JavaScript backend do not function the same way as they
do on C and C++ backends, so for bitwise operations we may need to mask them
back down into their allowed range when they get shifted outside it.
Since they do work as expected on the other backends, a default bitmask
of all 1's is casted down into the target type as an easily optimizable
"& 0xFF" operation for these backends.
* Fixup: this should still be a func
* Run test case on js target
* Adapt testcase to contributor guide and best practices
* Simplify constrain logic and turn into actual no-op for the C side
|
|
|
|
|
|
|
|
| |
* typetraits: add toSigned, toUnsigned
* improve and add tests
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
|
|
|
|
| |
to avoid confusion with unrelated std/vmutils (#18660)
|
| |
|
|
|
|
|
|
|
| |
* Rotation right and left refactored to generics
Continuation of [16622](https://github.com/nim-lang/Nim/pull/16622)
* add runnableExamples
|
|
|
|
|
| |
* fix nim js cmp fails at CT
* follow up #17539
|
|
|
|
|
|
|
| |
* Update lib/pure/bitops.nim
* Update lib/system/sets.nim
* Apply suggestions from code review
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* IC: renamed to_packed_ast module to ic module
* IC: don't store the --forceBuild flag, makes it easier to test
* IC: enable hello world test
* Codegen: refactorings for IC; changed the name mangling algorithm
* fixed the HCR regressions
* life is too short for HCR
* tconvexhull is now allowed to use deepCopy
* IC exposed a stdlib bug, required a refactoring
* codegen: code cleanups
* IC: even if a module is outdated, its dependencies might come from disk
* IC: progress
* IC: better name mangling, module IDs are not stable
* IC: another refactoring helping with --ic:on --gc:arc
* disable arraymancer on Windows for the time being
* disable arraymancer altogether
* IC: make basic test work with 'nim cpp'
* IC: progress on --ic:on --gc:arc
* wip; name mangling for type info
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#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
Use func
Use let in runnableExamples
* Remove unnecessary tests
Fix #7587
|
|
|
|
|
| |
builtins and intrinsics. (#16622)
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
|
|
|
| |
adding missing commas between the importc and header pragmas of some procs.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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()
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
| |
|
|
|
|
| |
--styleCheck:error
|
|
|
|
|
|
| |
* add bit operator names
* add test for bitop alias
|
|
|
|
|
|
| |
* Enable range checking for unsigned integers
* Make the tests green
|
| |
|
| |
|
|
|
| |
Shouldn't testing bit require only immutable access? I think this is a typo
|
| |
|
| |
|
| |
|
|
|