metagn
2449c37137
better procvar ambiguity errors, clean up after #20457 ( #20932 )
...
* better procvar ambiguity errors, clean up after #20457
fixes #6359 , fixes #13849
* only trigger on closedsymchoice again
* new approach
* add manual entry for ambiguous enums too
* add indent [skip ci]
* move to proc
2022-12-01 08:01:13 +01:00
ringabout
a7133e0594
removed unused sections in codegen ( #20976 )
2022-11-30 21:51:13 +01:00
Jaremy Creechley
5658e8e5c5
Add --genCDeps for better integration with CMake ( #20950 )
...
* add gencdeps option
* add case statement
* Update compiler/main.nim
* Update compiler/main.nim
* Apply suggestions from code review
Fixes
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-11-29 15:27:48 +01:00
ringabout
3d5edb41be
fixes #20958 ; fixes the return type of slice function [backport] ( #20959 )
...
* fixes #20958 ; fixes the return type of slice function
* add a testcase
2022-11-29 07:21:44 +01:00
ringabout
d4afa53fd5
fixes #13583 ; enforce void for nkWhileStmt ( #20947 )
...
* fixes #13583 ; enfore void for nkWhileStmt
* one more case
2022-11-29 06:41:38 +01:00
metagn
15d00ca0e1
allow proc expressions in place of statements ( #20935 )
...
properly fixes #18714
2022-11-29 06:37:00 +01:00
metagn
555c5ed1a7
fix bugs with dot & call operators [backport] ( #20931 )
...
* better error messages for dot operators [backport]
fixes #13063
* also fixes #7777
* fix #6981 and #9831 too
* fix
* minor improvement
* sus test fixes
* make test multiplatform lol
* fix nimsuggest test, extra improvements
2022-11-28 21:33:02 +01:00
Jake Leahy
d26b1232ee
Add nkFastAsgn into semExpr ( #20939 )
...
* Add nkFastAsgn into case statement
* Add test case
2022-11-27 20:09:25 +01:00
ringabout
b57a9637e8
fixes #20914 ; fixes the alignment of big sets ( #20918 )
...
* fixes #20914 ; fixes the align of bug sets
* add a test for alignof
2022-11-26 07:48:11 +01:00
ringabout
27a38a9fce
fix #13790 ; ptr char (+friends) should not implicitly convert to cstring ( #20761 )
...
* fix =#13790 ptr char (+friends) should not implicitly convert to cstring
* Apply suggestions from code review
* first round; compiles on windows
* nimPreviewSlimSystem
* conversion is unsafe, cast needed
* fixes more tests
* fixes asyncnet
* another try another error
* last one
* true
* one more
* why bugs didn't show at once
* add `nimPreviewCstringConversion` switch
* typo
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
2022-11-24 07:49:23 +01:00
ringabout
ef29987781
An unnamed break in a block now gives an UnnamedBreak warning ( #20901 )
...
* unnamed break in the block now gives an error
* bootstrap
* fixes
* more fixes
* break with label
* label again
* one moee
* Delete test5.txt
* it now gives a UnnamedBreak warning
* change the URL of bump back to the original one
2022-11-24 07:31:47 +01:00
metagn
5adfaa2a92
render post expr blocks better ( #20871 )
...
* render post expr blocks
* remove pointless diff
* fix PR split mistake
2022-11-22 20:40:05 +01:00
Bung
8cfce70738
fix #18964 Small string case with else statement first in AST evaluat… ( #20862 )
...
fix #18964 Small string case with else statement first in AST evaluates wrongly
2022-11-22 20:08:17 +01:00
ringabout
0448f30fd9
fixes #20026 ; marks system procs which can raise defects ( #20864 )
...
* marks system procs which can raise defects
* add tests
* add more systemRaisesDefect
* add comment
2022-11-22 20:07:00 +01:00
Bung
354eb2a86c
fix #20866 [ORC] Bad codegen for global pointer to iterator ( #20876 )
2022-11-22 20:05:16 +01:00
Yuriy Glukhov
fc37554795
NimMain/NimPreMain calls are now only volatile when it makes sense. ( #20882 )
2022-11-22 15:55:31 +01:00
Kyle Coffey
f4553af343
Fix compiler build with -d:nimDebugReorder ( #20888 )
...
* add missing import for -d:debugReorder
* rename compile-time symbol to match best practices
Fix #20887 .
2022-11-22 15:51:17 +01:00
Matt Moseley
75493cfb78
Small cleanup to cgen output ( #20874 )
2022-11-21 15:00:46 -05:00
ringabout
1707bc4a99
fixes #20856 ; store defaults directly ( #20859 )
...
* fixes #20856 ; store defaults directly
* fixes
* fixes
* check
* fixes
2022-11-17 09:38:50 +08:00
ringabout
06cd15663d
fixes ptr to cstring warnings[backport] ( #20848 )
...
* fix =#13790 ptr char (+friends) should not implicitly convert to cstring
* Apply suggestions from code review
* first round; compiles on windows
* nimPreviewSlimSystem
* conversion is unsafe, cast needed
* fixes more tests
* fixes asyncnet
* another try another error
* last one
* true
* one more
* why bugs didn't show at once
* add `nimPreviewCstringConversion` switch
* typo
* fixes ptr to cstring warnings[backport]
* add fixes
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
2022-11-16 10:22:51 +01:00
ringabout
3d692d08f7
fixes a long-standing ARC bug ( #20849 )
...
* fixes an ARC bug
* add a testcase
2022-11-16 07:36:14 +01:00
Don-Duong Quach
32b145460f
createDir is now callable at compile time ( #20824 )
2022-11-14 20:13:04 +01:00
ringabout
7f2ff909d9
fixes object default fields bugs and add tests ( #20839 )
...
* fixes object default fields bugs and add tests
* Update compiler/semmagic.nim
* Update compiler/sem.nim
* Update compiler/sem.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-11-15 00:31:06 +08:00
ringabout
d901d3b8c5
fixes #20836 ; fixes #20833 ; fixes unsafeNew ( #20841 )
...
* fixes #20836 ; fixes `unsafeNew`
* fixes #20833
2022-11-14 15:59:37 +01:00
Andrey Makarov
3eef0491a8
fix a few "broken link" warnings ( #20837 )
2022-11-14 15:43:29 +08:00
Bung
1410243d3b
fix #3505 wrong var {.global.} initialization, asign variable to it ( #20812 )
...
* fix #3505 wrong var {.global.} initialization, asign variable to it
* fix #5132 as well
* follow suggestions
* handle all call kinds
* Update tests/global/t3505.nim
* Update compiler/semstmts.nim
* Update compiler/semstmts.nim
* Update compiler/semstmts.nim
* follow suggestion
* Update compiler/semstmts.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-11-12 22:57:07 +01:00
Andreas Rumpf
165d523edf
Revert "fixes #20699 ; generate an empty struct for void type" ( #20806 )
...
* Revert "fixes #20699 ; generate an empty struct for void type (#20790 )"
This reverts commit 8fcb9380f0 .
* better fix [backport]
2022-11-12 22:56:40 +01:00
Andreas Rumpf
852cf596ed
fixes a strange issue most likely caused by a git merge ( #20822 )
2022-11-12 13:12:28 +01:00
metagn
77e58bf573
fixes #20807 , refs #20450 , regression with seq inference ( #20818 )
2022-11-12 05:27:51 +01:00
ringabout
8e1181bde5
issue a warning for ptr to cstring conversion[backport] ( #20814 )
...
* issue a warning for ptr to cstring conversion[backport]
* add a changelog
2022-11-11 19:32:33 +01:00
ringabout
a15872ba9e
refactor strongSpaceB with an enum ( #20809 )
...
refactor strongSpaceB
2022-11-10 16:21:52 +01:00
Aditya Siram
8fcb9380f0
fixes #20699 ; generate an empty struct for void type ( #20790 )
...
* fixes #20699 ; generate an empty struct for void type
* Add docs and test case.
2022-11-09 20:15:06 +01:00
tersec
6894a00409
reduce openArray-related C undefined behavior ( #20795 )
2022-11-09 18:08:44 +01:00
ringabout
f11b7debf7
remove name field for ARC ( #20797 )
...
* remove name field for ARC
* mistake
* improvement
* better
* typo
* fixes a pre-existing bug
2022-11-09 16:22:55 +01:00
ringabout
0ead94c4eb
add more {.cursor.} to vm ( #20796 )
2022-11-09 12:53:32 +01:00
ringabout
cdb136f585
arc/orc no longer needs type names by default; with nimTypeNames it gets nicer names ( #20789 )
...
Co-authored-by: Araq <rumpf_a@web.de >
2022-11-08 20:39:42 +01:00
ringabout
7d15fdd375
implements display based subtype checking (6.4x faster without threads; 2.8x faster with threads) ( #20781 )
...
* WIP: fast 'of' operator based on the literature
* implement display based subtype checking
Co-authored-by: Araq <rumpf_a@web.de >
2022-11-08 13:08:01 +01:00
ringabout
600b3a91ab
fixes regression #20746 ; remove string copies for ORC booted compiler ( #20776 )
...
* fixes #20746 ; remove string copies for ORC booted compiler
* add a test case
* use `cursor` thanks to @beef331
* for old compilers
* change file extension
* change test cases
2022-11-07 14:36:43 +01:00
ringabout
a228e331f3
fixes regression #17121 ; adding doc comment in importc proc makes it silently noop at CT ( #20766 )
...
* fixes regression #17121 ; adding doc comment in importc proc makes it silently noop at CT
* Update compiler/vmgen.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-11-06 22:25:55 +08:00
Bung
bae0fb720a
fix #19149 Invalid codegen when returning var tuple from a template ( #20762 )
...
* fix #19149 Invalid codegen when returning var tuple from a template
* fix type
2022-11-06 11:49:34 +01:00
Bung
fdc8dd4128
Arc global ( #20768 )
...
* temp
* unsure
* fix condition
* port macro arc runable examples to one file
* trigger doc ci
* fix
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
2022-11-06 11:47:35 +01:00
Andreas Rumpf
3c2c728eb6
codegen: optimized generation of proc headers ( #20770 )
2022-11-06 11:46:19 +01:00
ringabout
afd4e22f76
Revert "fix arc global variable issues" ( #20764 )
...
* Revert "fix arc global variable issues (#20759 )"
This reverts commit a3d32a4176 .
* trigger documentation builds
2022-11-05 22:47:12 +08:00
Bung
10e7f18d01
remove compiler/strutils2.nim ( #20748 )
...
* use std strutils toLowerAscii char
* avoid additional call and assign
* remove compiler/strutils2.nim
* canonical
2022-11-05 12:22:45 +01:00
Bung
a3d32a4176
fix arc global variable issues ( #20759 )
...
* temp
* unsure
2022-11-05 12:22:16 +01:00
konsumlamm
4491da4c4d
Support doc comments in new-styled concepts ( #20752 )
...
Support comments in new-styled concepts
2022-11-04 20:32:41 +08:00
Bung
ecc8f61fe4
Fix #18079 Illegal storage access compiling call with nested ref/deref ( #20738 )
...
* add test case
* refactoring transformAddrDeref and fix #18079
* fix jsgen
2022-11-04 09:54:45 +01:00
Juan Carlos
46eac22172
Improve dollar int ( #20737 )
...
Improve dollar
2022-11-03 09:44:11 +01:00
ringabout
0b1d1b7886
fixes #15688 ; handle strongSpace overflow issues ( #20724 )
...
* fixes #15688 ; handle `strongSpace` overflow issues
* stop at 1
* change the type of strongSpaceA to bool
2022-11-03 09:18:09 +01:00
ringabout
c4e5dab419
fixes #20740 ; fixes pre-existing field visibility issues and removes efSkipFieldVisibilityCheck ( #20741 )
...
fixes #20740 pre-existing field visibility and refactoring
2022-11-03 15:46:16 +08:00