Commit Graph

22851 Commits

Author SHA1 Message Date
araq
6f976bcfd9 be lenient 2025-11-12 22:24:07 +01:00
ringabout
1f1c205ce0 Merge branch 'devel' into araq-compress3 2025-11-12 21:12:49 +08:00
Araq
99d8669971 progress 2025-11-12 14:04:33 +01:00
ringabout
d5549a3c65 updates to macos-15 (#25278)
ref https://github.com/actions/runner-images/issues/13046
2025-11-12 20:33:26 +08:00
araq
9039ab4a3e progress 2025-11-12 12:22:58 +01:00
araq
8a5cb55f57 omg 2025-11-12 11:02:43 +01:00
araq
297556925e improvements 2025-11-12 10:25:56 +01:00
araq
6f2c3e92f3 another big refactoring 2025-11-12 10:11:50 +01:00
araq
2430796fe9 fix 2025-11-12 08:22:50 +01:00
Araq
821bb65cc3 progress 2025-11-12 07:39:49 +01:00
Araq
e6e9b6feb9 efficient getters and setters 2025-11-12 05:37:41 +01:00
araq
3625c1ae08 progress 2025-11-11 21:27:56 +01:00
araq
f5e004376c progress 2025-11-11 17:04:02 +01:00
araq
d4439a1771 Merge branch 'araq-compress2' into araq-compress3 2025-11-11 16:36:00 +01:00
araq
0df59d7fed remove tests 2025-11-11 16:35:30 +01:00
Araq
38b62d5db7 more IC related refactorings 2025-11-11 14:29:33 +01:00
ringabout
a57b6d8406 uses csources_v3 (#25273) 2025-11-11 14:00:47 +01:00
araq
18723609ab make test green 2025-11-11 13:57:50 +01:00
lit
2679b3221c fixes #19846; std/unicode.strip trailing big chars (#25274)
fixes #19846
2025-11-11 12:01:07 +01:00
Araq
d7543ed125 make nimsuggest compile again 2025-11-11 11:46:14 +01:00
Araq
820a51ee6d stupid typo 2025-11-11 10:55:30 +01:00
araq
13d30b9341 progress 2025-11-11 10:51:02 +01:00
Araq
16480c4d02 experiment: big refactoring 2025-11-11 07:32:37 +01:00
araq
1ab4f1fe19 make explicit 2025-11-10 13:53:26 +01:00
Ryan McConnell
cc4c7377b2 silence mass dump of BareExcept when using unittest (#25260)
Seems better to change it to `CatchableError` instead?
2025-11-10 07:27:50 +01:00
Araq
908c4e41f4 progress 2025-11-09 19:21:09 +01:00
Araq
eb53434429 make CI happy 2025-11-09 17:28:18 +01:00
araq
a9bc2133fd progress 2025-11-09 15:35:32 +01:00
araq
7cb0676bf0 progress 2025-11-09 11:40:26 +01:00
araq
cf4ac37643 progress 2025-11-09 09:50:11 +01:00
araq
44f3dcc9a3 wip 2025-11-08 23:42:04 +01:00
araq
2cb1c539e0 wip 2025-11-08 15:51:55 +01:00
araq
e173a6a7b5 added TLoc writing 2025-11-08 09:04:37 +01:00
araq
0bf8bbfd9f progress 2025-11-08 08:52:19 +01:00
araq
940ce87c73 prepare for dependency tracking 2025-11-08 07:42:26 +01:00
ringabout
92468e99f7 fixes #25265; fixes #23453; Unable to build Nim 2.2.6 tools from source (#25269)
fixes #25265;
fixes #23453

`(addr deref (ptr object))` generated weak typedesc before, which causes
problems for old GCC versions. As a bonus, by generating a typedesc for
`deref (ptr object)`, it also fixes #23453
2025-11-08 06:04:05 +01:00
Araq
e6a1c14d91 progress 2025-11-07 23:35:45 +01:00
araq
b4c942c4cd wip 2025-11-07 21:27:08 +01:00
Andreas Rumpf
dc2fb81d9d Merge branch 'devel' into demotomohiro-add-ast2nif2 2025-11-07 17:16:32 +01:00
araq
6a2f4d29c4 wip 2025-11-07 15:52:00 +01:00
Andreas Rumpf
a866bf2a39 VM: optimize 'return' slots; saves millions of node allocations for N… (#25266)
…imbus
2025-11-07 13:53:24 +01:00
ringabout
6d3254a86f fixes #25251; SIGBUS with iterator over const Table lookup - premature temporary destruction (#25255)
fixes #25251

enforce a copy if the arg is a deref of a lent pointer since the arg
could be a temporary that will go out of scope
2025-11-07 13:53:24 +01:00
Jacek Sieka
155b06a4f5 Add heaptrack support (#25257)
This PR, courtesy of @NagyZoltanPeter
(https://github.com/waku-org/nwaku/pull/3522) adds the ability to track
memory allocations in a program suitable for use with
[heaptrack](https://github.com/KDE/heaptrack).

By passing `-d:heaptrack --debugger:native` to compilation, calls to
heaptrack will be injected when memory is being allocated and released -
unlike `-d:useMalloc` this strategy also works with `refc` and the
default memory pool.

See https://github.com/KDE/heaptrack for usage examples. The resulting
binary needs to be run with `heaptrack` and with the shared
`libheaptrack_preload.so` in the `LD_LIBRARY_PATH`.
2025-11-07 13:53:24 +01:00
ringabout
116c220e3f fixes #25263; provides a new switch mangle:nim/cpp for debug name mangling (#25264)
fixes #25263

- [x] documentation and changelogs
2025-11-07 13:53:24 +01:00
metagn
839cbeb371 js: replace push.apply with for loop for string add [backport] (#25267)
While `a.push.apply(a, b)` is better for performance than the previous
`a = a.concat(b)` due to the fact that it doesn't create a new array,
there is a pretty big problem with it: depending on the JS engine, if
the second array is too long, it can [cause a
crash](https://tanaikech.github.io/2020/04/20/limitation-of-array.prototype.push.apply-under-v8-for-google-apps-script/)
due to the function `push` taking too many arguments. This has
unfortunately been what the codegen produces since 1.4.0 (commit
707367e1ca).

So string addition is now moved to a compilerproc that just uses a `for`
loop. From what I can tell this is the most compatible and the fastest.
Only potential problem compared to `concat` etc is with aliasing, i.e.
adding an array to itself, but I'm guessing it's enough that the length
from before the iteration is used, since it can only grow. The test
checks for aliased nim strings but I don't know if there's an extra
protection for them.
2025-11-07 20:19:50 +08:00
Andreas Rumpf
809662a228 VM: optimize 'return' slots; saves millions of node allocations for N… (#25266)
…imbus
2025-11-07 11:05:13 +01:00
ringabout
6f73094263 fixes #25251; SIGBUS with iterator over const Table lookup - premature temporary destruction (#25255)
fixes #25251

enforce a copy if the arg is a deref of a lent pointer since the arg
could be a temporary that will go out of scope
2025-11-07 10:06:05 +01:00
Jacek Sieka
861ebc0f19 Add heaptrack support (#25257)
This PR, courtesy of @NagyZoltanPeter
(https://github.com/waku-org/nwaku/pull/3522) adds the ability to track
memory allocations in a program suitable for use with
[heaptrack](https://github.com/KDE/heaptrack).

By passing `-d:heaptrack --debugger:native` to compilation, calls to
heaptrack will be injected when memory is being allocated and released -
unlike `-d:useMalloc` this strategy also works with `refc` and the
default memory pool.

See https://github.com/KDE/heaptrack for usage examples. The resulting
binary needs to be run with `heaptrack` and with the shared
`libheaptrack_preload.so` in the `LD_LIBRARY_PATH`.
2025-11-06 17:33:52 +01:00
ringabout
1d08c4e241 fixes #25263; provides a new switch mangle:nim/cpp for debug name mangling (#25264)
fixes #25263

- [x] documentation and changelogs
2025-11-06 16:41:13 +01:00
demotomohiro
43ff7b1dc4 loads modules imported by system module and create module sym before decode 2025-11-06 04:50:21 +09:00