Add line directives for C code variables (#21466) [backport:1.6] (#21518
Avoid calling build_all* when nim binary is present (#21522)
- `nimble` will build `nim` using `bin/nim` and if it is already present we can reuse it. (cherry picked from commit fb00b48)
fixes #21306; fixes #20485; don't transform yields in the var section…
… when introducing new local vars [backport: 1.6] (#21489) * fixes #21306; don't transform yields in the var section when introducing new local vars * adds `inVarSection` so the var section in the var section is freshed * use `isIntroducingNewLocalVars` to avoid yield transformations in var sections * fixes comments (cherry picked from commit f2dad94)
don't access void* out of alignment in refc GC to avoid UB (#21560)
(cherry picked from commit e8a70ff)
fixes #21496; Ambiguous calls compiles when module name are equal (#2…
fix #20972 fixes invalid and UB codegen case object transitions for b…
remove seq[T] setLen undefined behavior (#21582)
remove seq[T] setLen UB (cherry picked from commit 51ced0d)
terminal size env-vars have precendence in POSIX (#21643)
In POSIX Base Definitions Section 8.1 Environment Variable Definition, it is explained that the `COLUMNS` and `LINES` environment variables, if present, take precedence over any other implementation-defined method to determine the terminal size. This is useful, for example, to capture output programmatically in simulations for various terminal sizes. (cherry picked from commit 75205fe)
fix #20997 calling system.card[T](x: set[T]) with T of int8 or uint8 … (
Fix json.to for float fields that are not present (#21695)
(cherry picked from commit 418e544)
Fix long link commands on macOS (v1.6) (#21381)
Handle long link commands on macOS with a script, since ar does not support response files Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
(cherry picked from commit 4d81080)
Fixed generic distinct conversions for 'var' (#18837)
* SameTypeAux now properly traverses generic distincts * Smarter traversal of distincts * Removed redundant check * Fixed nkConv for jsgen * Added test for non distinct nkConv * using skiptypes for distinct now * Fixed genaddr for nkconv (cherry picked from commit 83a2515)
Fixed distinct composite type class proc borrowing (#18904)
* Fixed composite type class proc borrowing * Moved borrow search into transf * added borrow check to symbol flag (cherry picked from commit 8d5a275)
Fix VM's sametype impl to work for generics/typedescs (#19073)
* Fix vm's sametype implementation to properly handle generics and typedescs * actually fixed sametype + have test * added comments and removed unsafe code (cherry picked from commit cc98421)
Add test for issue 15435 (#19079)
* Add test for issue 15435 Closes #15435. * Specify bug # in comment Addresses #19079 (comment) (cherry picked from commit 539bced)
(cherry picked from commit 2859069)
Atomic inc/dec should use ATOMIC_SEQ_CST (#19212)
(cherry picked from commit 0992854)
Generic parameters now can constrain statics in type definitions (#19362
) * Parameters now can constrain static in type definitions resolved regression with generic procedures * Update compiler/sigmatch.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> (cherry picked from commit a93f6e7)
Fixed concept constraints for static types (#19391)
(cherry picked from commit 7bdfeb7)
Don't reject types directly on AST (#19407)
Instead of rejecting type expressions based on node kind, evaluate the expression as a type. This is already the behavior for call results, and it has its own error for non-types, which is the same error you would normally get with 2 words swapped. (cherry picked from commit 08261cb)
[add testcase] NRVO does not occur with init procedures (#19462)
* fix nnkBracketExpr not compiling for getImpl on customPragmaNode * fix test import * fix alias not working with hasCustomPragmas (cherry picked from commit 486cb09)
compiler: Handle nkCheckedFieldExpr better in dfa (#19616)
Simply recurse into their first child, which is always a nkDotExpr instead of treating them seperately. This fixes the rhs sym of a nkCheckedFieldExpr being checked twice in aliases. This double checking didn't cause any issues, but was unintentional and redundant. (cherry picked from commit 3e83d73)
remove unnecessary framePtr code (#19645)
(cherry picked from commit afbcba9)
remove tmpFramePtr when optStackTrace is absent (#19649)
(cherry picked from commit 84ac003)
(cherry picked from commit 7d32425)
No need to export pos from OptParser (#19688)
Co-authored-by: flywind <xzsflywind@gmail.com> (cherry picked from commit 065f568)
macros: make hasCustomPragma more permissive (#19747)
Make hasCustomPragma return false rather than fail for invalid parameters. (cherry picked from commit 82680a1)
give a better error message for some template expansions (#19871)
(cherry picked from commit 25d8926)
Better range error messages (#19867)
* Better range error messages * Revert to old behavior for arrays * Small corrections (cherry picked from commit d33e112)
Fix distinct requiresInit test and manual (#19901)
fix distinct test and manual (cherry picked from commit caf6aff)
ref #19830; multiple definition of in Nim generated static libraries (#…
Allow recursive closure iterators (#19939)
(cherry picked from commit ce4078a)