narimiran
9ce81868a8
Revert "fixes #9940 ; genericAssign does not take care of the importC variables in refc [backport] ( #23761 )"
...
This reverts commit fda43d1f0a .
2024-07-09 13:02:30 +02:00
narimiran
d993aff496
Revert "try to fix broken tests"
...
This reverts commit 786bbff1ae .
2024-07-09 13:02:19 +02:00
narimiran
786bbff1ae
try to fix broken tests
2024-06-28 08:31:43 +02:00
ringabout
fda43d1f0a
fixes #9940 ; genericAssign does not take care of the importC variables in refc [backport] ( #23761 )
...
fixes #9940
(cherry picked from commit 828cd58d8a )
2024-06-27 14:09:14 +02:00
Giuliano Mega
3864066408
[Backport 1.6] Fix reset code gen for range types ( #22462 , #23214 ) ( #23215 ) ( #23638 )
...
This is a backport of https://github.com/nim-lang/Nim/pull/23215 . I
thought I'd put a PR instead of [just asking for
it](https://github.com/nim-lang/Nim/pull/23215#issuecomment-2125829028 ).
🙂
2024-05-23 11:30:15 +02:00
ringabout
ac1dc03258
fixes regression #23280 ; Operations on inline toOpenArray len return a wrong result ( #23285 )
...
fixes #23280
(cherry picked from commit 4b67cccf50 )
2024-02-07 20:26:27 +01:00
Andreas Rumpf
9d573f4a1d
fixes #16331 ; aliasing of tuple construction within a single assignme… ( #22113 )
...
* fixes #16331 ; aliasing of tuple construction within a single assignment, great coding style
* added test case
(cherry picked from commit e8d0f1c3ae )
2023-09-11 13:52:58 +02:00
heterodoxic
6b11a9ec28
fixes #15428 by updating deep open array copy codegen ( #21935 )
...
* fix #15428
* add test
(cherry picked from commit af3fd5a010 )
2023-09-11 12:02:28 +02:00
heterodoxic
476031f0ed
fix #10964 by honoring pointer deref syntax if a reified openarray is used to get an array's length ( #21925 )
...
* fix #10964
* add test
(cherry picked from commit 6128ef53c5 )
2023-06-15 14:45:58 +02:00
metagn
c2d098b974
.inheritable fix for 1.6 ( #21768 )
2023-05-03 18:30:43 +02:00
ringabout
19dd56f018
fixes #20139 ; hash types based on its path relative to its package path ( #21274 ) [backport:1.6]
...
* fixes #20139 ; hash types based on its path relative its project
* add a test case
* fixes procs
* better implementation and test case
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
(cherry picked from commit 38d299dfc0 )
2023-03-09 18:32:51 +01:00
ringabout
5abf259908
fixes #20141 ; dereferencing pointer to incomplete type error with cast ( #20147 )
...
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
(cherry picked from commit e33e9e4a32 )
2022-09-30 09:49:07 +02:00
Andreas Rumpf
73e569fec9
fixes the regressions caused by the fix for #20107 [backport] ( #20287 )
...
* fixes the regressions caused by the fix for #20107 [backport]
(cherry picked from commit 5211a471c8 )
2022-08-31 15:16:47 +02:00
Andreas Rumpf
dda6181fff
fixes #20107 ( #20246 ) [backport]
...
(cherry picked from commit b1fe1690c4 )
2022-08-23 13:31:50 +02:00
quantimnot
fd76c00479
Refactor and doc package handling, module name mangling ( #19821 )
...
* Refactor and doc package handling, module name mangling
* Consolidate, de-duplicate and extend package handling
* Alter how duplicate module names of a package are handled
* Alter how module names are mangled
* Fix crash when another package is named 'stdlib' (test case added)
* Doc what defines a package in the manual
Modules with duplicate names within a package used to be given 'fake'
packages to resolve conflicts. That prevented the ability to discern if
a module belonged to the current project package or a foreign package.
They now have the proper package owner and the names are mangled in a
consistent manner to prevent codegen clashes.
All module names are now mangled the same. Stdlib was treated special
before, but now it is same as any other package. This fixes a crash
when a foreign package is named 'stdlib'.
Module mangling is altered for both file paths and symbols used by the
backends.
Removed an unused module name to package mapping that may have been
intended for IC. The mapping was removed because it wasn't being used
and was complicating the issue of package modules with duplicate names
not having the proper package owner assigned.
* Fix some tests
* Refactor `packagehandling`
* Remove `packagehandling.withPackageName` and its uses
* Move module path mangling from `packagehandling` to `modulepaths`
* Move `options.toRodFile` to `ic` to break import cycle
* Changed import style to match preferred style
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com >
(cherry picked from commit d30c6419a0 )
2022-07-18 07:55:08 +02:00
flywind
9df55a8979
output byref types into --header file [backport: 1.6] ( #19505 )
...
* output byref types into --header file
fix #19445
* fix comments
* set targets
(cherry picked from commit 2c01c9c4c8 )
2022-03-24 12:26:00 +01:00
Andreas Rumpf
ff819757be
fixes #19631 ( #19618 )
...
Aliasing is hard and we have to watch out not to compile 'x = f(x.a)' into 'f(x.a, addr x)'
(cherry picked from commit 731eabc930 )
2022-03-22 15:45:49 +01:00
flywind
9aff19f51a
mangle names in nimbase.h using cppDefine ( #19395 ) [backport]
...
mangle names in nimbase.h
fix comments
(cherry picked from commit 4f6b59de96 )
2022-01-17 11:16:29 +01:00
flywind
1247043c90
fix marshal bugs in VM ( #19161 ) [backport:1.6]
...
(cherry picked from commit fe46c8b5f1 )
2021-11-22 16:30:41 +01:00
Andreas Rumpf
167881bb83
fixes #19051 [backport:1.6] ( #19133 )
...
(cherry picked from commit c6fc3b2eae )
2021-11-17 09:26:08 +01:00
flywind
cebf7cdc1e
fix #10128 ( #18852 )
2021-09-14 19:40:42 +02:00
flywind
bf1700bab1
add testcase for #7308 ( #18849 )
2021-09-14 19:39:55 +02:00
Timothee Cour
198b5e3a7a
improve tsets.nim, twrong_setconstr.nim and avoid name clashes with compiler sets ( #17876 )
...
* improve tests/sets/tsets.nim and avoid name clashes with compiler sets
* avoid name clashes in twrong_setconstr.nim and merge into tsets
2021-04-29 13:53:58 +02:00
Timothee Cour
840e13deb7
type with same name in different scope now works ( #17710 )
...
* type with same name in different scope now works
* fix tests/enum/tenum.nim which was wrong because it was affected by this bug
2021-04-14 08:50:15 +02:00
Clyybber
3cbc80045d
Fix #14325 ( #17308 )
...
* Fix #14325
* Refactor and fix
2021-03-11 14:03:25 +01:00
flywind
5628cd5de1
attempt to fix #16374 ( #17232 )
...
* remove unnecessary when statement
* remove outdated codes
* attempt to fix #16374
* fix
2021-03-02 19:41:55 +08:00
Timothee Cour
6c5872c169
--nilseqs is now a deprecated noop (#17211 )
...
* --nilseqs is now a deprecated noop
* fix tests; fix: future => sugar
2021-03-01 20:59:43 +01:00
flywind
d447c0fe3f
use typeof instead type ( #16962 )
2021-02-08 09:46:07 +01:00
Clyybber
bebfbaa439
Add testcase for #14880 ( #16795 )
2021-01-22 13:14:28 +01:00
flywind
5af13c5ace
close #9655 add testcase ( #16683 )
2021-01-11 18:02:32 +01:00
flywind
6d442a40a6
use doAssert in tests ( #16486 )
2020-12-28 14:13:21 +01:00
Timothee Cour
7e1ae35195
testament: error instead of silently ignore invalid targets; remove pointless alias target vs targets; document matrix; DRY ( #16343 )
...
* testament: error instead of silently ignore invalid targets
* s/target/targets/
* fix test; refs #16344
* address comments
* Update testament/specs.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-12-14 10:58:29 +01:00
Timothee Cour
b809562c7c
make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec ( #16151 )
...
* fix megatest newlines
* still allow missing trailing newline for now but in a more strict way than before
2020-11-28 09:09:31 +01:00
Andreas Rumpf
4fdaded227
updated repr tests ( #16147 )
2020-11-26 20:00:31 +01:00
Andreas Rumpf
cf516713d0
fixes https://github.com/status-im/nimbus-eth2/issues/1549 ( #16146 )
...
* fixes https://github.com/status-im/nimbus-eth2/issues/1549 [backport:1.4]
* test fixup
2020-11-26 19:05:21 +01:00
flywind
581bcfe290
fix #6497 ( #16027 )
...
* fix #6497
* add testcase for #16027
2020-11-18 07:56:31 +00:00
Andrey R (cooldome)
1663ad77e3
Revert "fix #15623 ( #16009 )"
...
This reverts commit 0f7f159a35 .
2020-11-17 18:54:14 +00:00
flywind
0f7f159a35
fix #15623 ( #16009 )
...
* fix #15623
* add testcase for #15623
* fix
* add testcase
2020-11-17 17:05:20 +00:00
flywind
d802a4a669
close #13062(add testcase for #13062 ) ( #15956 )
2020-11-13 12:49:30 +01:00
flywind
4374c638cd
closes #6036 ( #15779 )
...
* add testcase for #6036
* try
* try again
* make it work
2020-10-30 10:00:25 +01:00
Andreas Rumpf
8978112457
fixes a C code generator regression, no need to backport, only the 1.4 line is affected ( #15569 )
2020-10-14 13:58:36 +02:00
Andreas Rumpf
b703f02ad2
added missing .noalias support for object fields ( #15445 )
2020-10-01 09:46:50 +02:00
Andreas Rumpf
50b6f6996a
.noalias annotation; frontend support ( #15419 )
...
* .noalias annotation; frontend support
* added .noalias support to Nim; implements https://github.com/nim-lang/RFCs/issues/204
2020-09-28 13:51:39 +02:00
Andreas Rumpf
57b7841c18
better support for slices as views ( #15414 )
...
* moved view tests to tests/views
* refactoring
* more refactorings
* better support for system.toOpenArray for first class view types
2020-09-27 09:20:10 +02:00
Andreas Rumpf
10988d4840
borrow checking ( #15282 )
...
* refactoring: move procs to typeallowed.nim
* frontend preparations for first class openArray support
* prepare the code generator for first class openArray
* code generation for first class openArray; WIP
* code generation for open arrays, progress
* added isViewType proc
* preparations for borrow checking
* added borrow checking to the front end
2020-09-09 07:32:03 +02:00
Clyybber
d409694b02
:D
2020-07-11 19:17:40 +02:00
Clyybber
425972c4e8
Add testcase for some old fixed issues ( #14960 )
...
* Add testcase for #2703
* Add testcase for #2586
* Small fix
2020-07-10 19:21:50 +02:00
Clyybber
af27e6bdea
Fix #14396 ( #14793 )
...
* Correct Left-To-Right evaluation of proc args
* Fix CPP backend
* Add testcase
* closes #14396
* closes #14345
* Improve test and optimize
* Improve testcase and optimize literals
* Fix bug
* Expand testcase and use DFA to optimize
* Turn genParams into proc
* Turn withTmpIfNeeded into a proc
* Cleanup
* Fix crash
* Better analysis
* Cleanup
* Trailing newline..
* Fix build
* Tiny cleanup
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-07-04 17:45:07 +02:00
Andreas Rumpf
52c3633223
warn about observerable stores but don't prevent them for 1.2.2 [backport:1.2]; refs https://github.com/nim-lang/RFCs/issues/230 ( #14510 )
2020-05-30 19:38:51 +02:00
Andreas Rumpf
16003bffe1
fixes #14126 [backport:1.2] ( #14390 )
...
* fixes #14126 [backport:1.2]
* used more logic to optimize it further; updated Nimble version
2020-05-20 00:41:57 +02:00