narimiran
22896b3a95
bump NimVersion to 2.0.9
2024-07-08 11:17:49 +02:00
narimiran
5935c3bfa9
bump NimVersion to 2.0.8
2024-07-02 17:05:59 +02:00
Andreas Rumpf
16bbffcb77
fixes #23725 ; Size computations work better when they are correct ( #23758 )
...
[backport]
(cherry picked from commit 8096fa45bd )
2024-06-26 08:15:51 +02:00
ringabout
e77e129a05
fixes #23742 ; setLen(0) no longer allocates memory for uninitialized strs/seqs for refc ( #23745 )
...
fixes #23742
Before my PR, `setLen(0)` doesn't free buffer if `s != nil`, but it
allocated unnecessary memory for `strs`. This PR rectifies this
behavior. `setLen(0)` no longer allocates memory for uninitialized
strs/seqs
(cherry picked from commit 2bef08774f )
2024-06-24 08:29:11 +02:00
narimiran
10907cc4a7
bump NimVersion to 2.0.7
2024-06-24 08:24:34 +02:00
narimiran
c00e8e71e0
bump NimVersion to 2.0.6
2024-06-16 19:01:20 +02:00
narimiran
a073e225c8
Revert "fixes #22510 ( #23100 )"
...
This reverts commit d6bc8699b9 .
2024-06-16 19:01:01 +02:00
Andreas Rumpf
140d641443
fixes #22927 ; no test case extractable [backport] ( #23707 )
...
(cherry picked from commit 3770236bee )
2024-06-13 11:08:08 +02:00
Andreas Rumpf
d6bc8699b9
fixes #22510 ( #23100 )
...
(cherry picked from commit 69d0b73d66 )
2024-06-06 16:14:57 +02:00
ringabout
1425654e9d
fixes #23556 ; typeinfo.extendSeq generates random values in ORC ( #23557 )
...
fixes #23556
It should somehow handle default fields in the future
(cherry picked from commit 36bf3fa47b )
2024-05-23 08:57:27 +02:00
ringabout
6d38eafda1
fixes #23304 ; uses snprintf instead of sprintf ( #23322 )
...
fixes #23304
(cherry picked from commit dfd778d056 )
2024-04-22 10:22:28 +02:00
ringabout
45f1b19942
clean up goto exceptions; remove the setjmp.h dep ( #23259 )
...
(cherry picked from commit e3350cbe6f )
2024-04-22 08:53:03 +02:00
ringabout
2ed16bf2d4
fixes #23139 ; Cannot get repr of range type of enum ( #23164 )
...
fixes #23139
(cherry picked from commit 3dee1a3e4c )
2024-04-19 16:42:27 +02:00
Jacek Sieka
71dde8f7cf
reserve sysFatal for Defect ( #22158 )
...
Per manual, `panics:on` affects _only_ `Defect`:s - thus `sysFatal`
should not redirect any other exceptions.
Also, when `sysFatal` is used in `nimPanics` mode, it should use regular
exception handling pipeline to ensure exception hooks are called
consistently for all raised defects.
(cherry picked from commit 58c44312af )
2024-04-18 10:30:26 +02:00
ringabout
683a1213db
fixes #22860 ; suppress AnyEnumConv warning when iterating over set ( #22904 )
...
fixes #22860
(cherry picked from commit af556841ac )
2024-04-18 10:30:16 +02:00
ringabout
a5a6a4d39e
fixes #22790 ; use cast suppress AnyEnumConv warnings for enums withou… ( #22813 )
...
…t holes
fixes #22790
(cherry picked from commit ecaccafa6c )
2024-04-18 09:04:17 +02:00
ringabout
cb899ccf25
ref #19727 ; implement setLenUninit for seqsv2 ( #22767 )
...
ref #19727
(cherry picked from commit 285cbcb6aa )
2024-04-18 09:00:58 +02:00
ringabout
577ffbc57c
items, pairs and friends now use unCheckedInc ( #22729 )
...
`{.push overflowChecks: off.}` works in backends. Though it could be
implemented as a magic function.
By inspecting the generated C code, the overflow check is eliminated in
the debug or release mode.

Likewise, the index checking is probably not needed.
(cherry picked from commit d82bc0a29f )
2024-04-18 09:00:28 +02:00
Amjad Ben Hedhili
bbf32118a2
followup of #22568 ( #22690 )
...
(cherry picked from commit 38b58239e8 )
2024-04-17 16:01:36 +02:00
Amjad Ben Hedhili
3ddacd90d1
Remove some unnecessary initialization in seq operations ( #22677 )
...
* `PrepareSeqAdd`
* `add`
* `setLen`
* `grow`
Merge after #21842 .
---------
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
(cherry picked from commit fbb5ac512c )
2024-04-17 16:01:17 +02:00
Amjad Ben Hedhili
12f2c36aca
Make newSeqOfCap not initialize memory. ( #21842 )
...
It's used in `newSeqUninitialized`.
---------
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
(cherry picked from commit 8853fb0775 )
2024-04-17 15:53:16 +02:00
ringabout
a12cb273b3
fixes #22664 ; guard against potential seqs self assignments ( #22671 )
...
fixes #22664
(cherry picked from commit 5f13e15e0a )
2024-04-17 15:51:26 +02:00
ringabout
09109c55c9
clean up gc:arc or gc:orc in docs and in error messages ( #22408 )
...
* clean up gc:arc/orc in docs
* in error messages
(cherry picked from commit 10a6e4c236 )
2024-04-17 10:54:56 +02:00
konsumlamm
526dbf0cf2
Make repr(HSlice) always available ( #22332 )
...
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
(cherry picked from commit d37b620757 )
2024-04-17 09:34:31 +02:00
narimiran
3ad16028aa
bump NimVersion to 2.0.5
2024-04-16 15:49:33 +02:00
narimiran
d4b58b0b06
bump NimVersion to 2.0.4
2024-03-19 16:39:02 +01:00
rockcavera
7e6f4723c3
Fix system.currentSourcePath() documentation [backport 2.0] ( #23243 )
...
The documentation links for `parentDir()` and `getCurrentDir()` are
broken as they are no longer part of `std/os`. Link changed to
`std/private/ospaths2`.
(cherry picked from commit 9c155eaccc )
2024-01-30 08:11:10 +01:00
narimiran
fe1d4a6232
bump NimVersion to 2.0.3
2024-01-03 10:57:30 +01:00
narimiran
c4c44d10df
bump NimVersion to 2.0.2
2023-12-14 17:51:05 +01:00
Amjad Ben Hedhili
ef8b8317ff
Fix capacity for const and shallow [backport] ( #22705 )
...
(cherry picked from commit b542be1e7d )
2023-12-14 17:47:00 +01:00
Amjad Ben Hedhili
75441dcdc3
Initialize newString in js [backport:1.6] ( #22745 )
...
```nim
echo newString(8)
```
results in:
```
D:\User\test.js:25
var code_33556944 = c_33556931.toString(16);
^
TypeError: Cannot read properties of undefined (reading 'toString')
at toJSStr (D:\User\test.js:25:50)
at rawEcho (D:\User\test.js:70:16)
at Object.<anonymous> (D:\User\test.js:101:1)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1147:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:17:47
Node.js v17.0.1
Error: execution of an external program failed: '"C:\Program Files\nodejs\node.exe" --unhandled-rejections=strict D:\User\test.js'
```
(cherry picked from commit eadd0d72cf )
2023-10-24 08:49:16 +02:00
Amjad Ben Hedhili
5c916b645b
Remove some unnecessary initialization in string operations ( #22579 )
...
* `prepareAdd`
* `toNimStr`
* `setLengthStrV2`
* `NimAsgnStrV2`
* `prepareMutation`
* Some cleanups
(cherry picked from commit a4df44d9fb )
2023-09-18 12:13:00 +02:00
ringabout
ba8c9a9d1e
newStringOfCap now won't initialize all elements anymore ( #22568 )
...
newStringOfCap nows won't initialize all elements anymore
(cherry picked from commit 2e7c8a339f )
2023-09-18 12:12:59 +02:00
ringabout
562fb0d14b
fixes #22481 ; fixes card undefined misalignment behavior ( #22484 )
...
* fixes `card` undefined misalignment behavior
* Update lib/system/sets.nim
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
(cherry picked from commit ade75a1483 )
2023-09-18 12:12:58 +02:00
ringabout
4a7cdaecb4
fixes #22262 ; fixes -d:useMalloc broken with --mm:none and --threads on ( #22355 )
...
* fixes #22262 ; -d:useMalloc broken with --mm:none and threads on
* fixes
(cherry picked from commit a23e53b490 )
2023-09-18 10:13:09 +02:00
Amjad Ben Hedhili
81d58d2cc8
Make capacity work with refc [backport] ( #22697 )
...
followup of #19771 .
(cherry picked from commit 325341866f )
2023-09-14 06:02:46 +02:00
Amjad Ben Hedhili
4850bb5a59
fix seq.capacity [backport] ( #22505 )
2023-08-22 08:22:42 +02:00
narimiran
d1db4c29fa
bump NimVersion to 2.0.1
2023-08-11 10:47:05 +02:00
narimiran
a488067a41
bump NimVersion to 2.0.0
2023-07-31 21:22:28 +02:00
Bung
d51bc084fd
remove thread duplicated code ( #22348 )
2023-07-31 10:58:59 +02:00
ringabout
9471b5f964
fixes #22256 ; fixes GC_disableOrc overflow ( #22257 )
2023-07-11 19:01:18 +02:00
Solitude
9ddd768cce
Rename seq.add parameter to be consistent with refc ( #22244 )
2023-07-10 14:27:28 +02:00
Juan Carlos
148ff74c93
Fix #21401 ( #22232 )
2023-07-07 09:18:40 +02:00
Jacek Sieka
cb40f11e6c
uint arithmetic for pointers ( #22159 )
...
pointers are not signed and arithmetic may correctly cross int.max
threshold
this PR only fixes 2 occurances - there are plenty however in the std
lib
2023-06-27 08:20:02 +02:00
tersec
3e44d5742f
rm zero-extension and uint conversions deprecated since 0.19.9 ( #22151 )
2023-06-25 20:37:21 +02:00
Andreas Rumpf
8c3b0e9b48
added new experimental API isUniqueRef ( #21812 )
...
* added new experimental API isUniqueRef
* typo
2023-06-16 19:35:16 +02:00
Miran
7ea8f1d5dd
bump NimVersion to 1.9.5 ( #22112 )
2023-06-16 17:20:28 +02:00
ringabout
0f3d6b5a52
small fixes for atomicArc ( #22017 )
...
* small fixes for atomicArc
* Update lib/system/arc.nim
2023-06-06 21:22:07 +02:00
ringabout
1133f20fe2
lift the =dup hook ( #21903 )
...
* fixes tests again
* remove helper functions
* fixes closures, owned refs
* final cleanup
2023-06-02 16:03:32 +02:00
ringabout
108410ac34
fixes fieldDefect loses enum type info in ORC; consistent with VM and refc ( #21954 )
...
fixes fieldDefect loses enum type info in ORC
2023-05-29 14:59:59 +02:00