17056 Commits

Author SHA1 Message Date
c-blake
bf320ed172 Attempt to explain better why delImplIdx is the way it is. Maybe this can (#15108)
avoid future implementation mischief.  (Maybe not.  Sometimes, general
distrust of theory leads people to distrust simple reasoning over times
from CPUs trying as hard as possible to mask DRAM latency via pre-fetch.)

(cherry picked from commit 196e747df1)
v1.2.6
2020-07-29 11:59:40 +02:00
Andreas Rumpf
e9d6d2b961 fixes #14616 [backport:1.2] (#15109)
(cherry picked from commit a3a87cdb29)
2020-07-29 11:59:20 +02:00
Bung
9d11fc026b fixes #14189 (#15080) [backport]
(cherry picked from commit 191c388792)
2020-07-29 10:43:48 +02:00
Jjp137
896c3c41d3 parsecsv: fix '\0' being displayed as '0' in docs (#15086) [backport]
(cherry picked from commit a62bc55955)
2020-07-29 10:43:36 +02:00
Andreas Rumpf
f2844ba2d3 fixes #15038 [backport:1.2]
(cherry picked from commit aae998feff)
2020-07-29 10:43:20 +02:00
Bung
a3f00b87e1 fix #14534 (#15060) [backport]
(cherry picked from commit 9746868832)
2020-07-29 10:39:39 +02:00
Araq
df490bd59f fixes #15056 [backport]
(cherry picked from commit 12a9fe017e)
2020-07-29 10:39:29 +02:00
Andreas Rumpf
b4ccdf870b fixes #15044 [backport:1.2]
(cherry picked from commit c90c53e8bb)
2020-07-29 10:39:11 +02:00
narimiran
c0e1ee965a bump NimVersion to 1.2.6 2020-07-29 09:54:54 +02:00
c-blake
c804e559ad Fulfill https://github.com/nim-lang/Nim/pull/14995#issuecomment-664914391 (#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.

(cherry picked from commit b2a1944587)
2020-07-29 09:54:39 +02:00
narimiran
378dc7c9fb bump NimVersion to 1.2.5 2020-07-23 20:24:00 +02:00
Andreas Rumpf
d0a2857675 enforce browsers.nim only handles URLs [backport] (#15045)
(cherry picked from commit 925dd92e07)
2020-07-23 11:52:15 +02:00
Miran
170f5b6229 asyncftpclient.nim - don't assume a sufficiend line length (#14973)
(cherry picked from commit f4f21c89e5)
2020-07-22 15:52:18 +02:00
Miran
e71395f571 fix several newline problems (#15028) [backend]
* prevent newlines where they shouldn't be
* 'contentLength' shouldn't be negative

(cherry picked from commit 5fafa2fd5c)
2020-07-22 15:47:58 +02:00
Dominik Picheta
ddcbc1a58f [Backport] Fixes callbacks being dropped on Linux/macOS/BSD. (#15012)
Fixes #15003.

This is a serious bug which occurs when data cannot be read/sent
immediately and there are a bunch of other read/write events
pending. What happens is that the new events are dropped which
results in the case of the reported bug resulted in some data not
being sent (!).

(cherry picked from commit 1e3a0ef1e1)
2020-07-21 15:46:41 +02:00
cooldome
28bc815d3e fix odbc regressions (#15009) [backport]
* fix odbc regressions

* make only necessary changes

(cherry picked from commit edbbbdf1a8)
2020-07-21 15:46:23 +02:00
Bung
e854d385f5 fix #9771 (#14357)
* fix #9771
* map SQLLEN SQLULEN
* fix proc params take TSqlLen

Co-authored-by: bung87 <crc32@qq.com>
(cherry picked from commit ce0552c100)
2020-07-21 15:46:11 +02:00
Miran
27acb43e69 fix #14082, don't crash on incorrectly formatted input (#14977) [backport]
(cherry picked from commit c62513049c)
2020-07-21 15:42:58 +02:00
Clyybber
1b093d7ec7 Fix #14911 (#14922) [backport]
* Fix #14911

* Add testcase

* Fix test

(cherry picked from commit 5bd2da3f64)
2020-07-21 15:40:24 +02:00
aguspiza
4d6cb1ff21 SSL_CTX_load_verify_locations parameters are reversed (#14815) [backport]
(cherry picked from commit d968163cd1)
2020-07-21 15:40:18 +02:00
narimiran
ba808ba7ee bump NimVersion to 1.2.4 v1.2.4 2020-06-26 10:46:56 +02:00
narimiran
a5667218a9 update test command for 'norm' package 2020-06-25 13:03:12 +02:00
Miran
7c27cdc719 [backport] fix #14748, move gdb files to other section of installer.ini (#14772)
(cherry picked from commit 6bf2990f66)
2020-06-24 06:56:37 +02:00
Andreas Rumpf
f864c351f0 fixes #14240 [backport:1.2] (#14757)
(cherry picked from commit 451129de42)
2020-06-24 06:56:14 +02:00
Andreas Rumpf
ac00504928 fixes #14458 [backport:1.2] (#14756)
(cherry picked from commit 8df20276c9)
2020-06-24 06:56:05 +02:00
alaviss
bcb6d9a763 posix_other: add define to force time_t to 64 bit [backport] (#14753)
This is a temporary remedy for time_t transition to 64 bit on newer
Linux libc (musl >= 1.2.0, glibc >= 2.32).

In the future we might want to move away from libc, or figure out a way
to reliably detect the real size of C types at compile time, both of
which are difficult.

(cherry picked from commit c8554ebc0c)
2020-06-24 06:55:56 +02:00
ee7
90546716dc [backport] Docs: Fix broken code-block (#14749)
This commit indents the contents of a `code-block` in `httpclient.nim`
so that it displays correctly. The bug was introduced by 42a64245f8.

I did a quick search for other `code-block`s that are broken in the same
way, but the only other one I found (in `pegs.nim`) is not included in
the generated documentation.

(cherry picked from commit 1e484ed62b)
2020-06-24 06:55:34 +02:00
alaviss
8083a1fd2f encodings: use only one iconv definition [backport:1.2] (#14741)
Fix an issue reported on IRC: using encodings with --dynlibOverrideAll
result in duplicated iconv definitions, causing compile errors.

This commit remove the `var` wrapper of iconv and go all out on
pointers, as it should due to how the API accepts nil. Also corrected
the API to resemble iconv(3p).

(cherry picked from commit c7dee55b87)
2020-06-24 06:54:15 +02:00
Araq
49f2b7eac6 fixes #14718 [backport]
(cherry picked from commit 65c7884a3c)
2020-06-24 06:54:05 +02:00
narimiran
25c21711b7 bump NimVersion to 1.2.3 2020-06-24 06:53:25 +02:00
narimiran
be34b5abe2 bump Nim version to 1.2.2 v1.2.2 2020-06-09 11:50:15 +02:00
Andreas Rumpf
5297bbe1cb optimized wrapWords; fixes #14579 (#14606) [backport:1.2]
(cherry picked from commit c308c2e60b)
2020-06-09 11:40:15 +02:00
Andreas Rumpf
10fb986fb6 more precise analysis about 'observable stores' [backport:1.2] (#14582)
(cherry picked from commit 32083c7ff8)
2020-06-08 13:26:33 +02:00
Andreas Rumpf
33bf7839ba fixes #14514 [backport:1.2] (#14533)
(cherry picked from commit 8710395a0f)
2020-06-08 13:26:28 +02:00
Zed
56b1e52e17 Fix asynchttpserver newline breaking content-length (#14565) [backport]
(cherry picked from commit ea761419ad)
2020-06-08 13:22:20 +02:00
Danil Yarantsev
5702a60793 Change severity of template instantiation message [backport] (#14526)
* Change severity of template instatiation msg

* Add a test

* Trailing newline argh

(cherry picked from commit 3698f197f1)
2020-06-01 17:41:04 +02:00
genotrance
4f689d4960 Fix #14057 - moveFile should overwrite on Windows (#14433)
(cherry picked from commit b012205b2e)
2020-06-01 17:40:11 +02:00
narimiran
4c0c82ae42 disable 'nimx' package, see PR #14293 2020-06-01 17:39:30 +02:00
Andreas Rumpf
2c64868764 warn about observerable stores but don't prevent them for 1.2.2 [backport:1.2]; refs https://github.com/nim-lang/RFCs/issues/230 (#14510)
(cherry picked from commit 52c3633223)
2020-06-01 13:39:16 +02:00
narimiran
957e74e99e correctly backport #14496 2020-06-01 13:38:04 +02:00
Andreas Rumpf
97c68d9446 fixes #14498 [backport:1.2] (#14503)
(cherry picked from commit 7ccc7d7e93)
2020-06-01 12:15:28 +02:00
Andreas Rumpf
aec0d583d1 fixes #14495 [backport:1.2] (#14496)
(cherry picked from commit 3105909f88)
2020-06-01 12:15:15 +02:00
Andreas Rumpf
051f4ffad9 manual.rst: updates [backport] (#14445)
(cherry picked from commit 79e85cb0b5)
2020-06-01 12:13:18 +02:00
Mamy Ratsimbazafy
ed966b77c3 The whole options module should be inline (#14417) [backport:1.2]
* The whole options module should be inline

* Use inline per proc and tag `lent` where appropriate

* Remove lent annotation (failing at compiletime)

(cherry picked from commit f71f8b0239)
2020-06-01 12:11:15 +02:00
Andreas Rumpf
7800fa394f specialize genericReset (#14398)
* progress
* make tests green
* maybe we also want to reset pointers, dunno
* progress
* cleanup; fixes #13879 [backport:1.2]

(cherry picked from commit b35d370d88)
2020-05-20 15:30:20 +02:00
Danil Yarantsev
bcfbaea833 Fix some typos in the manual [backport] (#14399)
(cherry picked from commit 1450924b1e)
2020-05-20 15:29:12 +02:00
Andreas Rumpf
acc3879c54 fixes #14126 [backport:1.2] (#14390)
* fixes #14126 [backport:1.2]

* used more logic to optimize it further; updated Nimble version

(cherry picked from commit 16003bffe1)
2020-05-20 09:04:49 +02:00
Ștefan Talpalaru
c0b749da38 fix #14364 (#14372) [backport:1.2]
Turn on the TLS emulation when using Boehm, since it doesn't scan the
real TLS.

(cherry picked from commit 27741d6a5c)
2020-05-19 12:15:59 +02:00
Clyybber
87992a3a18 Fix #14269 (#14286)
(cherry picked from commit 8e93105606)
2020-05-19 12:12:45 +02:00
Clyybber
c3ecd38da1 New "ping-pong" DFA (#14322)
* New ping-pong analysis

* Add testcase for #13456

* Remove debugging leftover

* Unquote "unstructured controlflow"

* Fix typo

* Fix exponential complexity in edge cases

* Add sanity testcase

* Fix

(cherry picked from commit 9f78f116b2)
2020-05-19 12:12:45 +02:00