| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
generic (#17942)
* fix #17941: UnusedImport works for var/let/const/type invoked inside a generic
* fixup
|
|
|
|
|
|
|
| |
* fix #14873 properly by skipping `abi` field in importc type
* add test
* fix test for windows
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
(#17909)
* system.nim cleanup some exported constants which should never have been exported
|
|
|
|
|
|
|
|
|
| |
* Ref #17831 use windows.h
* use header: "windows.h"
* Update syslocks.nim
* Update lib/system/syslocks.nim
|
| |
|
| |
|
|
|
|
|
|
| |
* close #7998
* workaround genode
* Update lib/system/syslocks.nim
|
|
|
|
|
| |
* fix #17749 SIGPIPE
* fix for windows
|
|
|
|
| |
cstring, not cString (#17744)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Remove the use of usrToCell in gcMark [backport:1.2]
Recently, we've discovered a GC crash resulting from inlining of
the memory allocation procs that allowed the compiler to avoid
maintaining any references to the "user pointer" on the stack.
Instead, a "cell pointer" appeared there and all field accesses
were performed with adjusted offsets. This interfered with the
ability of the GC to mark the correct cell in the conservative
stack scans which lead to premature collection of objects.
More details here:
https://github.com/status-im/Nim/commit/af69b3ceae16281efd45cbee4ce1bedd14282304
This commit closes another theoretical loophole that may lead to
the same problem. If a short proc is accessing both the object and
its reference count in a short sequence of instructions, the compiler
may be enticed to reduce the number of registers being used by storing
only a single pointer to the object and using offsets when reading
and writing fields. A perfectly good strategy would be to store only
the cell pointer, so the reference count updates can be performed
without applying offsets. Accessing the fields of the object requires
offsets anyway, but these can be adjusted at compile-time without any
loss. Following this strategy will lead to the same problem of marking
a wrong cell during the conservative stack scan, leading to premature
collection.
The problem is avoided by not using `usrToCell` in `gcMark`. Since
the cell discovery logic can already handle interior pointers, the
user pointers don't need to be adjusted for the GC to function correctly.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Genode: move dyncall failures to runtime
Do not use the "error" pragma to warn that dynamic library loading is
not implemented, print a message at runtime and exit.
* Genode: use stricter dataspace type in page allocator
* Genode: remove compiler configuration from nim.cfg
Self-hosting Nim is not supported on Genode and defining the
cross-compilation environment can be done externally.
* Genode: use new mutex API
* Genode: call nim_component_construct as a C procedure
* Genode: implement echo for NimStringV2
|
|
|
|
|
|
|
| |
* further progress on rst roles & dir-s (fix #17646)
* fix documents according to the messages
* fix bug 17 from #17340
|
| |
|
|
|
|
|
|
|
| |
* ensure the avr example keeps compiling
* Update tests/avr/thello.nim
* now compiles properly
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* fix https://github.com/nim-lang/RFCs/issues/294 ; disallow enum <=> enum conversion
* fix the runnableExamples that was the instigator of this RFC
* legacy -d:nimLegacyConvEnumEnum
* use -d:nimLegacyConvEnumEnum in important_package nimgame2
* add test for enum cast
* improve changelog
* add changelog: Changes affecting backward compatibility
* cleanup changelog
* fix changelog
|
|
|
|
| |
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is taken from:
https://github.com/status-im/Nim/commit/af69b3ceae16281efd45cbee4ce1bedd14282304
Full original comment:
This is to avoid heavy inlining happening when two allocation calls
would occur shortly after each other.
This inlining would sometimes be accompanied with an optimisation
as the compiler is able to see that cellToUsr ending the first
allocation call is shortly followed by an usrToCell call. The
pointer arithmetic is redundant and the compiler can eliminate it,
leaving only the cell address in a register (and later the stack)
instead of the actual pointer to the user data, as one would expect.
This combined with a GC collect cycle will cause the stack scan to
only notice the cell address, which is of no good due to a usrToCell
in the gcMark call which shifts that address to an adjacent cell.
This means that the actual cell of importance will not get marked
and thus cause a premature collection of that cell. BOOM.
|
|
|
|
|
|
|
| |
* Fix #17299
* Comment
* Fix typo
|
| |
|
| |
|
|
|
|
|
| |
* fix nim js cmp fails at CT
* follow up #17539
|
| |
|
| |
|
|
|
|
|
|
|
| |
* Update lib/pure/bitops.nim
* Update lib/system/sets.nim
* Apply suggestions from code review
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* IC: renamed to_packed_ast module to ic module
* IC: don't store the --forceBuild flag, makes it easier to test
* IC: enable hello world test
* Codegen: refactorings for IC; changed the name mangling algorithm
* fixed the HCR regressions
* life is too short for HCR
* tconvexhull is now allowed to use deepCopy
* IC exposed a stdlib bug, required a refactoring
* codegen: code cleanups
* IC: even if a module is outdated, its dependencies might come from disk
* IC: progress
* IC: better name mangling, module IDs are not stable
* IC: another refactoring helping with --ic:on --gc:arc
* disable arraymancer on Windows for the time being
* disable arraymancer altogether
* IC: make basic test work with 'nim cpp'
* IC: progress on --ic:on --gc:arc
* wip; name mangling for type info
|
|
|
|
|
|
|
| |
* improve test coverage for isolation
* a bit better
* rename channels to channels_builtin
|
| |
|
| |
|
|
|
|
|
|
|
| |
* IC: respect the -f switch
* IC: better rod file inspection
* progress
|
|
|
| |
Co-authored-by: flywind <xzsflywind@gmail.com>
|
| |
|
| |
|
|
|
|
|
|
|
| |
* remove unnecessary when statement
* remove outdated codes
* rename prepareStrMutation to prepareMutation
|
|
|
|
|
| |
* Update lib/system.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* fixes #17173
* add testcase (#17214)
* Apply suggestions from code review
* fix for newruntime
* Apply suggestions from code review
* Update lib/system.nim
* Update lib/system.nim
* Update lib/system.nim
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
Co-authored-by: flywind <xzsflywind@gmail.com>
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
* fix #17159 items(cstring) works in VM
* improve test coverage tests/stdlib/tcstring.nim; add helpers: whenRuntimeJs, whenVMorJs
* document items(cstring)
* address comments
|
|
|
|
|
|
|
| |
* add enumutils.items for enum with holes
* changelog
* ref in lib.rst
* use `type SomeSparseEnum* = (not Ordinal) and enum` instead of concept
* address comment: rename back to enum with holes
|
|
|
|
|
| |
* Fix a couple of rst formatting issues
* no need for the extra space
|
|
|
|
|
|
|
|
|
|
| |
* add simpler to use readChars overload
* use new readChars overload
* Update lib/wrappers/openssl.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
Co-authored-by: flywind <xzsflywind@gmail.com>
|
| |
|
| |
|