| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#15104)
request. This can be conceived as an alternate, more capable resolution of
https://github.com/nim-lang/Nim/issues/12200
than
https://github.com/nim-lang/Nim/pull/12208
The code re-org idea here is to upgrade tablimpl.nim:`delImpl`/`delImplIdx`
to abstract client code conventions for cell emptiness & cell hashing via
three new template arguments - `makeEmpty`, `cellEmpty`, `cellHash` which
all take a single integer argument and clear a cell, test if clear or
produce the hash of the key stored at that index in `.data[]`.
Then we update the 3 call sites (`Table`, `CountTable`, `SharedTable`) of
`delImpl`/`delImplIdx` by defining define those arguments just before the
first invocation as non-exported templates.
Because `CountTable` does not save hash() outputs as `.hcode`, it needs a
new tableimpl.nim:`delImplNoHCode` which simply in-lines the hash search
when no `.hcode` field is available for "prefix compare" acceleration.
It is conceivable this new template could be used by future variants, such
as one optimized for integer keys where `hash()` and `==` are fast and
`.hcode` is both wasted space & time (though a small change to interfaces
there for a sentinel key meaning "empty" is needed for maximum efficiency).
We also eliminate the old O(n) `proc remove(CountTable...)` in favor of
simply invoking the new `delImpl*` templates and take care to correctly
handle the case where `val` is either zero for non-existent keys in `inc`
or evolves to zero over time in `[]=` or `inc`.
The only user-visible changes from the +-42 delta here are speed, iteration
order post deletes, and relaxing the `Positive` constraint on `val` in
`proc inc` again, as indicated in the `changelog.md` entry.
|
|
|
|
| |
code compatibility (#15105)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fix #11352 strutil.insertSep handle negtive number
* test for #11352
* optimize
* not parts string var
* Update lib/pure/strutils.nim
Thanks!
Co-authored-by: alaviss <leorize+oss@disroot.org>
* need to be countdown
Co-authored-by: alaviss <leorize+oss@disroot.org>
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
generic type not mentioned in fields (#14709)
* fix #14698 nkRecWhen caused internalAssert in semConstructFields when generic type not mentioned in fields
* address comment
* Update compiler/semtypinst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#15078)
* fix #11354 jsgen not carefully handle genAddr with nkHiddenAddr,nkStmtListExpr; genAsgn with lvalue tyVar and rvalue tyPtr
* correct logic
* add test for #11354
* handle nkHiddenAddr when n.len == 1
* Update compiler/jsgen.nim
* Update compiler/jsgen.nim
* Apply suggestions from code review
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* Add a test-case for #12576
* Add a test-case for #12523
|
|
|
|
|
|
|
|
|
|
|
| |
* azure-pipelines: cache csources to speed up build
Building csources takes about 2-4 mins, and since it hasn't changed for
a long time, employ some caching to cut the time spent.
* azure-pipelines: remove ppa avoidance configs
Testing shows that there aren't any difference between having this and
not having it, so removing this to simplify the code.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Hopefully this will fix
"The job exceeded the maximum log length, and has been terminated."
|
|
|
| |
Initial work on bundling nim-lang/fusion as part of the Nim distribution.
|
|
|
|
| |
* closes #12990
* Add a test-case for #12990
|
|
|
|
|
| |
* strict func: much better error messages
* documented the 'strict funcs' mode
|
|
|
|
| |
https://github.com/nim-lang/RFCs/issues/234 (#15030)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
* fix assignment to converted concept type
* check for resolved concepts
* add extra test
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
There was a recent `rightSize` change in tables.nim, so the existing
value (4) was creating too large tables.
|
| |
|
| |
|
|
|
| |
no test case since only a special case was affected and the special case got removed
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
* prevent newlines where they shouldn't be
* 'contentLength' shouldn't be negative
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* shadow dom api
* fix typos
* host to Element type
* fix code style
* move elementsFromPoint to dom_extensions.nim
|
|\
| |
| | |
cursor inference bugfix
|