| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
* fix #14576 addr(param) now works in nim js
* workaround https://github.com/nim-lang/Nim/issues/14578
|
|
|
|
|
|
|
| |
* progress
* make tests green
* maybe we also want to reset pointers, dunno
* progress
* cleanup; fixes #13879 [backport:1.2]
|
|
|
|
|
| |
* Fix #14160
* Add testcase
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Error -> Defect for defects
The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.
With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
|
| |
|
|
|
|
|
|
|
| |
[backport:1.2]
* fix #13902 distinct uint64 type corruption on 32-bit with borrow
Co-authored-by: Timothee Cour <timothee.cour2+lightsail@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix typeSym.getImpl for ref types
* Fix a codegen issue affecting the test suite of nim-beacon-chain
* Fix tests/stdlib/tjsonmacro
To understand the fix better it may help to take a look
at the history of the replaced code.
The nil check that is removed in this commit was introduced
in another fix that failed to identify the root cause of the
issue - namely that we allow an object type to exist for which
no ast is present:
https://github.com/nim-lang/Nim/pull/9601/files
The original intention of the code is more obvious here:
https://github.com/nim-lang/Nim/pull/9538/files
|
|
|
|
|
|
|
| |
* fixes #13744
* improve style
Co-authored-by: cooldome <ariabushenko@gmail.ru>
|
| |
|
|
|
|
| |
* cycle breaking as an alternative to cycle detection
|
|
|
|
|
| |
* scope based destructors
* handle 'or' and 'and' expressions properly, see the new test arc/tcontrolflow.nim
* make this branch mergable, logic is disabled for now
|
|
|
|
|
|
|
|
|
|
| |
* allow defects to be caught even for --exceptions:goto (WIP)
* implemented the new --panics:on|off switch; refs https://github.com/nim-lang/RFCs/issues/180
* new implementation for integer overflow checking
* produce a warning if a user-defined exception type inherits from Exception directly
* applied Timothee's suggestions; improved the documentation and replace the term 'checked runtime check' by 'panic'
* fixes #13627
* don't inherit from Exception directly
|
| |
|
|
|
|
| |
* fixes #13513
* merge tarithmetics in tarithm
|
| |
|
| |
|
|
|
|
|
|
| |
* Fixed codegen for constant cstring with --gc:arc, fixes #13321
* Added test for #13321
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
allocShared0. (#13190)
* Cleanup, remove lib/system/allocators.nim. seqs_v2 and strs_v2 now use
allocShared0 by default.
* Fixed -d:useMalloc allocShared / reallocShared / deallocShared. These now use the alloc/dealloc/realloc implementation that also takes care of zeroing memory at realloc.
* Removed debug printfs
* Removed unpairedEnvAllocs() from tests/destructor/tnewruntime_misc
* More mmdisp cleanups. The shared allocators do not need to zero memory or throw since the regular ones already do that
* Introduced realloc0 and reallocShared0, these procs are now used by
strs_v2 and seqs_v2. This also allowed the -d:useMalloc allocator to
drop the extra header with allocation length.
* Moved strs_v2/seqs_v2 'allocated' flag into 'cap' field
* Added 'getAllocStats()' to get low level alloc/dealloc counters. Enable with -d:allocStats
* *allocShared implementations for boehm and go allocators now depend on the proper *allocImpl procs
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* system/gc: don't export markStackAndRegisters
* compiler/cgen: unexport internal symbols
As these functions are Nim-specific walkaround against C's optimization
schemes, they don't serve any purpose being exported.
* compiler/cgen: don't export global var unless marked
* compiler/ccgthreadvars: don't export threadvar unless marked
* tests/dll/visibility: also check for exports
This ensure that these changes don't break manual exports.
* compiler/cgen: hide all variables created for constants
* compiler/ccgtypes: don't export RTTI variables
* compiler/ccgexprs: make all complex const static
* nimbase.h: fix export for windows
* compiler/cgen, ccgthreadvars: export variables correctly
For C/C++ variables, `extern` means that the variable is defined in an
another unit. Added a new N_LIB_EXPORT_VAR to correctly export
variables.
|
|
|
|
|
|
|
|
| |
* fixes #13195
* extra fix
* fix typo
|
|
|
|
| |
This reverts commit cd7904f2b29e623998a1d32ee726d000f56fc5ce.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* arc codegen for union type
* add more tests
* fix offsetof
* fix tsizeof test
* fix style
|
| |
|
|
|
|
| |
a few magic numbers with consts (#13170)
|
|
|
| |
fixes #13029
|
| |
|
|
|
|
|
| |
* config update
* ARC now supports 'repr' and 'new' with finalizers is supported
|
| |
|
|
|
|
|
| |
This implements "deterministic" exception handling for Nim based on goto instead of setjmp. This means raising an exception is much cheaper than in C++'s table based implementations. Supports hard realtime systems. Default for --gc:arc and the C target because it's generally a good idea and arc is all about deterministic behavior.
Note: This implies that fatal runtime traps are not catchable anymore! This needs to be documented.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
* fixes #12899
* fixes regression: destroy global variables in reverse declaration order, closureleak test relies on it
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* first implementation of the =trace and =dispose hooks for the cycle collector
* a cycle collector for ARC: progress
* manual: the .acyclic pragma is a thing once again
* gcbench: adaptations for --gc:arc
* enable valgrind tests for the strutils tests
* testament: better valgrind support
* ARC refactoring: growable jumpstacks
* ARC cycle detector: non-recursive algorithm
* moved and renamed core/ files back to system/
* refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Cleanup compiler code base
* Unify add calls
* Unify len invocations
* Unify range operators
* Fix oversight
* Remove {.procvar.} pragma
* initCandidate -> newCandidate where reasonable
* Unify safeLen calls
|
|
|
|
|
|
|
|
| |
(#12688) [backport]
* conversions to unsigned numbers are not checked anymore; implements / fixes https://github.com/nim-lang/RFCs/issues/175
* change the spec yet again to be less consistent but to make more sense; updated the changelog
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
* Remove sonsLen
* Use Indexable
|
| |
|
| |
|