| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
fixes #21278; deques.shrink off ny one bug
|
|
|
|
|
| |
* remove legacy code
* fixes
|
|
|
|
|
| |
* Document system:pop() may raise IndexDefect
* Add backticks to KeyError
|
|
|
|
|
| |
* Remove deprecated rightSize nop
* Remove deprecated rightSize nop
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* out parameters: enforce that 'out' is only used as a parameter
* make tables.nim use 'out' parameters
* better backwards compat
|
|
|
|
|
|
|
|
| |
* produce better code for closure environment creation
* new 'first write' analysis;
* scope based move analyser
* code cleanup
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* make more standard libraries work with `nimPreviewSlimSystem`
* typo
* part two
* Delete specutils.nim
* fixes more tests
* more fixes
* fixes tests
* fixes three more tests
* add formatfloat import
* fix
* last
|
|
|
| |
remove `var` from ref parameters; make it consistent
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* micro implementation of rfc 149
refs https://github.com/nim-lang/RFCs/issues/149
* number/array/seq literals, more statements
* try fix number literal alias issue
* renew expectedType with if/case/try branch types
* fix (nerf) index type handling and float typed int
* use typeAllowed
* tweaks + const test (tested locally) [skip ci]
* fill out more of the checklist
* more literals, change @ order, type conversions
Not copying the full call tree before the typedesc call check
in `semIndirectOp` is also a small performance improvement.
* disable self-conversion warning
* revert type conversions (maybe separate op later)
* deal with CI for now (seems unrelated), try enums
* workaround CI different way
* proper fix
* again
* see sizes
* lol
* overload selection, simplify int literal -> float
* range, new @ solution, try use fitNode for nil
* use new magic
* try fix ranges, new magic, deal with #20193
* add documentation, support templates
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
| |
* bootstrap the compiler with nimPreviewSlimSystem
* threads
|
|
|
|
|
|
|
|
|
| |
* Add sink and lent to critbits
* Remove lent for pairs
I guess lent doesn't work well inside tuples
* Remove lent from template in critbits
Apparently this also doesn't work, because some checks failed
|
|
|
| |
Found another small typo.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
`DoublyLinkedList` (#19315) [backport]
* Update lists.nim
* Update tlists.nim
|
|
|
|
|
|
|
|
|
| |
* Update lists.nim
* Update tlists.nim
* removed check `if b.tail != nil`
The tail of the list being null it is still possible to retrieve its end by going through all nodes from the head. So checking for null from `b.tail` is unnecessary. However, setting `a.tail = b.tail` only if `a.head != nil`, so you don't break a good list with an already broken one.
|
|
|
| |
Changes the order of procs definitions in order to avoid calling an undefined proc.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nim 1.4.x compiled the below code without error when using
`--experimental:strictFuncs`
import std/sequtils
type Foo = ref object
let foo1 = Foo()
let foo2 = Foo()
let foos = @[foo1, foo2]
let fooTuples = @[(foo1, 1), (foo2, 2)]
discard repeat(foo1, 3)
discard zip(foos, foos)
discard unzip(fooTuples)
However, since 2020-12-09, devel Nim produced errors like
/tmp/bar.nim(11, 15) template/generic instantiation of `repeat` from here
/foo/nim/pure/collections/sequtils.nim(172, 6) Error: 'repeat' can have side effects
an object reachable from 'x' is potentially mutated
/foo/nim/pure/collections/sequtils.nim(183, 15) the mutation is here
/foo/nim/pure/collections/sequtils.nim(183, 15) is the statement that connected the mutation to the parameter
This commit reverts some `proc` to `func` changes so that code that:
- calls `repeat`, `zip`, or `unzip`
- and instantiates them with types containing `ref`
can once again be compiled with `strictFuncs`. Otherwise, a user might
be forced to drop or alter their `strictFuncs` use when upgrading from
Nim 1.4.x, or when writing new code that uses these procedures (at least
for now, with the current `strictFuncs` implementation).
This commit also adds tests to assert that the remaining funcs in this
module can be compiled with `strictFuncs` when used with types
containing `ref`.
The original batch of `proc` to `func` changes in `sequtils.nim` was in
commit 6f57ebae349f, which was partially reverted in 38eb021f8158.
See also: https://github.com/nim-lang/Nim/issues/16305
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* complement notes of two doc strings warning the deprecated procedure's side effect
* Update lib/pure/collections/tables.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* Update lib/pure/collections/tables.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
Co-authored-by: BillyZee <billyzee@localhost.localdomain>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
|
|
|
| |
Use better names in example
|
|
|
|
|
|
|
|
| |
consistent with `system.delete` (#18487)
* deprecate sequtils.delete and add an overload with saner semantics
* AssertionDefect => IndexDefect
* improve tsequtils
* add tests; use splice in js for optimization
|
| |
|
|
|
|
| |
(#18168)
|
| |
|
|
|
|
|
| |
* Ref #17697 improve withValue docs
* address comments
|
| |
|
|
|
|
| |
* reduce duplicated deprecated messages
|
|
|
|
|
|
|
| |
generic (#17942)
* fix #17941: UnusedImport works for var/let/const/type invoked inside a generic
* fixup
|
| |
|
|
|
|
|
|
|
|
| |
* CIs: attempt to use csources_v1
* also updated the BSDs
* also updated azure pipelines
* std modules should not itself use the 'std/' import dir...
* compiler has to be careful with std/ for v1 booting
|
| |
|
|
|
|
|
|
|
|
|
| |
* use sink and lent in deques
* Update lib/pure/collections/deques.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
| |
|
|
|
|
|
|
|
| |
* improve test coverage for isolation
* a bit better
* rename channels to channels_builtin
|
| |
|
| |
|
| |
|
| |
|
| |
|