ringabout
deaf684375
fix #9423 followup #17594 : distinct generics now work in VM ( #21816 )
...
* fix #9423 distinct generics now work in vm
* fixes cpp tests
---------
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2023-05-10 11:06:14 +02:00
metagn
4b76037e5f
ignore inline hint for dynlib procs in codegen [backport] ( #21817 )
2023-05-09 21:44:47 +02:00
ringabout
4533e894ad
adds an experimental mm:atomicArc switch ( #21798 )
2023-05-08 16:25:47 +02:00
ringabout
ebdff1c7d3
fixes #21801 ; object field initialization with overloaded functions ( #21805 )
...
* fixes #21801 ; object field initialization with overloaded functions
* use the correct type
2023-05-08 13:52:28 +02:00
ringabout
4a94f3606e
revert #21799 and #21802 which don't pass the tests ( #21804 )
...
* Revert "ORC: make rootsThreshold thread local [backport] (#21799 )"
This reverts commit b74d49c037 .
* Revert "fixes #21752 [backport] (#21802 )"
This reverts commit d0c62fa169 .
2023-05-07 09:22:42 +02:00
ringabout
8cf5643621
fixes #21280 ; Enum with int64.high() value crashes compiler ( #21285 )
...
* fixes #21280 ; Enum with int64.high() value crashes compiler
* Update tests/enum/tenum.nim
* Update tests/enum/tenum.nim
* fixes tests
* Update tests/enum/tenum.nim
---------
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-05-06 21:38:17 +02:00
ringabout
b562e1e6d8
implement =dup hook eliminating wasMoved and =copy pairs ( #21586 )
...
* import `=dup` hook eliminating `wasMoved` and `=copy` pairs
* add dup
* add a test for dup
* fixes documentation
* fixes signature
* resolve comments
* fixes tests
* fixes tests
* clean up
2023-05-06 21:36:57 +02:00
metagn
ba698d37c3
some Token refactors ( #21762 )
...
* test some Token refactors
* fix CI
* showcase for more reductions, will revert
* Revert "showcase for more reductions, will revert"
This reverts commit 5ba48591f4 .
* make line and column int32
* remove int32 change
2023-05-06 21:27:28 +02:00
Andreas Rumpf
d0c62fa169
fixes #21753 [backport] ( #21802 )
2023-05-06 21:25:45 +02:00
quantimnot
365a753eed
Fix some styleCheck bugs ( #20095 )
...
refs #19822
Fixes these bugs:
* Style check violations in generics defined in foreign packages are raised.
* Builtin pragma usage style check violations in foreign packages are raised.
* User pragma definition style check violations are not raised.
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com >
2023-05-06 19:10:13 +02:00
ringabout
53c15f24e9
fixes #21704 ; remove nfIsRef for genLit in VM ( #21765 )
...
* fixes #21704 ; remove `nfIsRef` for genLit
* remove nfIsRef from the output of macros
* make the logic better
* try again
* act together
* excl nfIsRef
2023-05-06 18:04:08 +02:00
metagn
e92d7681bb
consistent use of scForceOpen for generic dot field symbols ( #21738 )
...
* always force open generic dot field symbols?
fixes #21724 but might break code
* alternative, should fix CI
* other alternative, add test for previous CI failure
* not needed
* make sure call doesn't compile too
* ok actual second test
* ok final actual correct test
* apply performance idea
* don't make fromDotExpr static
2023-05-05 07:28:06 +02:00
heterodoxic
a929e513fa
amends #21690 to fix broken Nim to C++ source line mappings ( #21784 )
...
resync fork
2023-05-04 20:09:53 +08:00
ringabout
c34950f8f5
minor cleanup vmprofiler ( #21783 )
2023-05-04 15:44:46 +08:00
metagn
44736d26cd
error on user pragma args ( #21776 )
...
closes #20978
2023-05-03 14:18:55 +02:00
metagn
ca82b4ea16
underscore as special word ( #21766 )
...
* underscore as special word
* fix really hard to notice error
2023-05-02 11:15:06 +02:00
metagn
c2bcfd8cd9
cheap fix for #10853 + better tuple subscript error message ( #21767 )
...
* cheap fix for #10853
* also better tuple subscript error message
* weird
2023-05-02 11:13:38 +02:00
ringabout
afc30ca879
fixes #19863 ; move sha1, md5 to nimble packages for 2.0 ( #21702 )
...
* move sha1, md5 to nimble packages
* boot the compiler
* fixes tests
* build the documentation
* fixes docs
* lol, I forgot koch.nim
* add `nimHasChecksums` define
* clone checksums but maybe copying is better
* bump nimble hash
* use ChecksumsStableCommit
* fixes tests
* deprecate them
* fixes paths
* fixes koch
2023-05-02 10:49:17 +02:00
Juan M Gómez
3e82a315fc
implements #21747 ( #21748 )
2023-05-02 10:10:51 +02:00
ringabout
8e0f336f6d
fixes #21483 ; fixes nim doc skips documentation of annotated elements of objects ( #21743 )
...
* fixes #21483 ; skipPragmaExpr
* add a test case for #21483
* fixes HTML
2023-04-29 15:30:44 +02:00
heterodoxic
91abf35442
improve C/C++ debug output readability (1/N) ( #21690 )
...
* hacky attempt to reconcile default explicit constructors with enforcement of brace initialization, instead of memsetting imported objects to 0
* improve C/C++ debug output readability (1/N)
2023-04-28 10:30:16 +02:00
ringabout
560fa9a1fe
handle quoted routine symbols and non symbols expressions as before ( #21740 )
2023-04-28 10:25:31 +02:00
Andreas Rumpf
220b450489
fixes #21245 ; warn about destructors that can raise ( #21726 )
...
* fixes #21245 ; warn about destructors that can raise
* doc update
* progress
* typo
2023-04-26 22:32:10 +02:00
ringabout
69c193e5e2
fixes #21731 ; fixes #21537 ; disable warnBareExcept by default [backport] ( #21728 )
...
* disable warnBareExcept for default
* fixes a typo
2023-04-26 08:04:13 +02:00
metagn
0032322ea8
fix #21727 ( #21729 )
2023-04-26 08:02:44 +02:00
Juan M Gómez
4754c51f1b
Pragma to force the exportc of a type. #21645 ( #21648 )
...
exportc export all types not just those used by exported proc/globals
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2023-04-24 17:44:29 +02:00
ringabout
0f226c0e48
fixes #21703 ; moveOrCopy should consider when vm ( #21721 )
2023-04-24 14:57:48 +02:00
Andreas Rumpf
20b011de19
refactoring in preparation for better, simpler name mangling that wor… ( #21667 )
...
* refactoring in preparation for better, simpler name mangling that works with IC flawlessly
* use new disamb field
* see if this makes tests green
* make tests green again
2023-04-24 06:52:37 +02:00
metagn
380dafcc32
fix iterator equality + add test for proc equality + fix sameType ( #21707 )
...
* fix iterator equality + add test also for procs
fixes #21706
* all targets
* and isNil and repr
* separate overloads, fix sameType
* more restricted sameType?
* merge overloads again??
* remove sametype change for now
* fix sameType anyway (CI failure was not related)
---------
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
2023-04-23 17:43:59 +08:00
ringabout
265a340e80
fixes booting warnings ( #21711 )
...
follow up https://github.com/nim-lang/Nim/pull/21604
2023-04-23 15:34:46 +08:00
metagn
63d29ddd69
alias syntax fixes, improvements and tests ( #21671 )
...
* alias syntax fixes, improvements and tests
* even better, cannot use alias syntax with generics
* more type tests, improve comment
* fix again
* consistent error message + make t5167_5 work
* more comments, remove {.noalias.}
2023-04-22 09:11:56 +02:00
Juan M Gómez
c136ebf1ed
implements #21620 : allowing to import multiple modules with shared names ( #21628 )
2023-04-21 15:40:13 +02:00
ringabout
b54b03d04f
tweak spellsuggest; three counts for equal distances candidates by default ( #21700 )
...
* tweak spellsuggest; three counts for equal distances candidates
* only suggest typos when length > 3
2023-04-21 15:36:18 +02:00
ringabout
9cb06d357e
fixes #21540 ; deref block at transf phase to make injectdestructors function properly ( #21688 )
...
* fixes #21540 ; deref block at transf phase to make injectdestructors function properly
* add a test case
* add one more test
* fixes the type of block
* transform block
2023-04-19 11:55:54 +02:00
metagn
2f547afb0f
import brackets support as and prefixes [backport] ( #21636 )
...
* import brackets support `as` and prefixes
fixes #21635
* copyTree -> copyNode
2023-04-18 10:35:35 +02:00
metagn
9dc1f2dd0f
actually fix #19015 ( #21680 )
...
* actually fix #19015
* more tests
* round out
2023-04-17 20:56:52 +02:00
metagn
202b190473
revert #21227 ( #21681 )
...
* revert #21227 but keep test
* add test for #21677
* don't export
* delete test
2023-04-17 20:56:11 +02:00
metagn
b0a98cc01e
warn on set types bigger than max size, default to 0..255 for int literals ( #21659 )
...
* test implicitly huge set types
refs https://github.com/nim-lang/RFCs/issues/298
* oh my god
* boot at least
* don't error, fix remaining issues, no 2 len arrays
* fix runnable example
* test assuming 0..255 for int literal
* test refactor, add changelog, test
2023-04-17 20:55:22 +02:00
Emery Hemingway
2621f78b68
compiler/docgen: pass --path:… to runnableExamples ( #21669 )
2023-04-17 20:53:42 +02:00
ringabout
65223e6f59
fixes #21674 ; lent can be used in the fields or the cast type as a parameter ( #21684 )
...
* fixes #21674 ; `lent` can be used in the fields or the cast type as a parameter
* add a test case
* fix the test
2023-04-18 00:31:47 +08:00
ringabout
91e4381a20
fixes #20155 ; repr range with distinct types is broken in ORC ( #21682 )
...
fixes #20155 ; repr range with distinct types is broken with ORC
2023-04-17 17:08:53 +02:00
metagn
8c4b7129b5
fix small mistake from #21629 ( #21672 )
2023-04-17 17:07:09 +02:00
Jaremy Creechley
1af21c2668
change compile pragma to use mangled compile objects ( #21678 )
...
change compile pragma to use mangle
2023-04-17 14:17:02 +02:00
Andreas Rumpf
ea8aafa7c9
minor codegen bugfix ( #21670 )
2023-04-15 01:17:17 +02:00
ringabout
512517c223
fixes #18146 ; fixes #19372 ; disable tlsEmulation on windows; static link pthreads with mingw ( #21668 )
...
* fixes #18146 ; disable tlsEmulation on windows; static link libwinthreads DLL
* whatever
2023-04-14 22:52:35 +02:00
metagn
1a99bcd6ab
runnableExamples imports std/assertions by default ( #21658 )
...
closes https://github.com/nim-lang/RFCs/issues/499
2023-04-14 12:39:23 +02:00
metagn
2a0d8a9a06
make grammar a bit more honest ( #21655 )
...
* test if expr parsing expr
refs #19802
* in any case
* just be honest
* fix symbol/keyword issue too
2023-04-14 12:34:49 +02:00
metagn
c694d8e4fd
custom pragmas: correct error condition, remove outdated symkind whitelist ( #21653 )
...
* test not restricting custom pragma applied symbols
fixes #21652
* fix other test
* different patch
* fix tests
* actually test #18212 and other routines
2023-04-13 12:50:43 +02:00
ringabout
16f42084d3
fixes #20900 ; Calling template through from generic function across module fails to build ( #21649 )
...
* fixes #20900 ; Calling template through from generic function across module fails to build
* sanother way
2023-04-13 12:11:06 +02:00
metagn
3f51b6f73d
set module symbol type to None instead of nil for discard check ( #21657 )
...
* set module symbol type to None instead of nil
fixes #19225
* alright
2023-04-13 11:56:16 +02:00