SirOlaf
2f441ac675
[backport] Handle nkOpenSymChoice for nkAccQuoted in considerQuotedIdent ( #20578 )
...
* Handle nkOpenSymChoice for nkAccQuoted in considerQuotedIdent
* Add test
* Update compiler/lookups.nim
Co-authored-by: SirOlaf <a>
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-10-18 14:56:38 -04:00
ringabout
b07526b2c7
refactor envvars, oserrors; register vmops ( #20592 )
...
* refactor envvars, oserrors; register vmops
* remove type definitions
2022-10-18 19:44:26 +02:00
Andreas Rumpf
81087c949f
fixes #20572 ( #20585 )
...
* fixes #20572
* added a test case
2022-10-17 23:48:51 +02:00
Can Lehmann
2102e3b02f
Fix #12517 Allow single branch when nimvm statements ( #20577 )
...
Allow single branch when statements
2022-10-17 08:01:53 +02:00
Andrey Makarov
081dfea746
Fix "imported but not used" warnings ( #20575 )
2022-10-16 20:24:16 +02:00
ringabout
0bacdf5fdf
fixes #20515 ; base method requires explicit {.gcsafe.} to be GC-safe ( #20574 )
...
* fixes #20515 ; base requires explicit `{.gcsafe.}` to be GC-safe
* add tests
2022-10-16 13:20:05 +02:00
ringabout
1e15f975b8
fixes #19162 ; enable strictEffects for v2 ( #19380 )
...
* enable stricteffects
* add gcsafe
* fix tests
* use func
* fixes pegs tests
* explicitly mark repr related procs with noSideEffect
* add nimLegacyEffects
* change URL
* fixes docopt
* add `raises: []` to repr
* fixes weave
* fixes nimyaml
* fixes glob
* fixes parsetoml
* Apply suggestions from code review
* Update testament/important_packages.nim
* add legacy:laxEffects
2022-10-15 14:07:40 +02:00
Bung
0510a2be0d
fix #19700 Crash when passing a template to a generic functio… ( #20567 )
...
fix nim-lang#19700 Crash when passing a template to a generic function expecting a procedure
2022-10-15 07:15:58 +02:00
Bung
b286448a99
fix #8821 JS codegen can produce extreme switch statements with case … ( #20548 )
...
* fix #8821 JS codegen can produce extreme switch statements with case a of range
* remove totalRange
2022-10-14 12:21:02 +02:00
Andreas Rumpf
07b645342a
fixes #3748 ( #20563 )
...
* fixes #3748
* fix the regression
* don't use the new allocator for the SSL wrapper
* fixes regression
2022-10-14 12:00:38 +02:00
ringabout
6082b9ea5d
fixes #20553 ; don't format code for stropping identifier ( #20561 ) [backport]
...
* fixes #20553 ; don't format code for stropping identifier
* add tests
* Update nimpretty/tests/expected/simple.nim
2022-10-13 23:37:41 +02:00
Bung
169d3fda00
fix #18136 tests/proc/t17157.nim now gives SIGSEGV instead of error ( #20555 )
2022-10-13 06:39:43 +02:00
Bung
ea2f2775a7
fix #18990 Regression in proc symbol resolution; Error: attempting to… ( #20554 )
...
fix #18990 Regression in proc symbol resolution; Error: attempting to call routine
2022-10-12 20:44:45 -04:00
Dominik Picheta
fa60378a7f
Return error message in output of gorge/staticExec. ( #18942 )
...
* Return error message in output of gorge/staticExec.
* Document nimLegacyGorgeErrors in changelog.
2022-10-12 18:52:22 +02:00
Bung
083ea8f10c
fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural' ( #20522 )
...
* fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural'
* try fix
2022-10-11 11:42:49 +02:00
ringabout
5602183234
'lock levels' are deprecated, now a noop ( #20539 )
...
* 'lock levels' are deprecated, now a noop
* fixes tests
2022-10-11 09:17:09 +02:00
Andreas Rumpf
7587371554
time to make IC work with ORC (here we go again...) ( #20538 )
...
works for me
2022-10-11 09:00:07 +02:00
Andreas Rumpf
08ae3467b9
refactorings ( #20536 )
...
* refactoring
* refactoring: removed unused macroUsagesSection
* enum instead of bool for better readability
2022-10-10 21:40:07 +02:00
ringabout
e290b028ab
Make rstgen work with gcsafe ( #20534 )
...
* Make rstgen work with gcsafe
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com >
* add tests and fixes
* if nimHasWarningAsError
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com >
2022-10-10 18:56:01 +02:00
ringabout
d954e698b3
Automatic dereferencing is removed ( #20531 )
2022-10-10 15:02:23 +02:00
Bung
db3d2971cf
fix #18886 crash on ambiguous proc cast ( #20472 )
...
* fix #18886 crash on ambiguous proc cast
* follow suggestion
2022-10-10 11:09:54 +02:00
ringabout
0c0b086d58
fixes #20524 ; add forbids pragmas to hideable lists ( #20525 )
...
* fixes #20524 ; add forbids pragmas to hideable lists
* fixes nimdoc
2022-10-09 12:13:45 -04:00
Andreas Rumpf
e83f27e6a0
out parameters: enforce that 'out' is only used as a parameter ( #20510 )
...
* out parameters: enforce that 'out' is only used as a parameter
* make tables.nim use 'out' parameters
* better backwards compat
2022-10-07 22:26:53 +02:00
ringabout
079363bfc3
remove implicit let/var default initialization ( #20508 )
2022-10-07 07:49:27 +02:00
Andreas Rumpf
0d23419e68
DAA and 'out' parameters ( #20506 )
...
* DAA and 'out' parameters
* progress
* documented strictDefs and out parameters
* docs, tests and a bugfix
* fixes silly regression
2022-10-06 17:08:41 +02:00
ringabout
e323b91a32
correct grammar (ref #20199 ) and add check for grammar.txt ( #20494 )
...
* correct grammar; ref #20199
* add check for keeping grammar.txt up-to-date
* add nimTestGrammar
2022-10-06 16:36:32 +02:00
Ivan Yonchovski
7caa037936
Fix/improve handling of forward declarations in nimsuggest ( #20493 )
...
* Fix/improve handling of forward declarations in nimsuggest
- ideUse now works fine when invoked on the implementation
- implemented ideDeclaration to make cover lsp feature textDocument/declaration
- fixed performance issue related to deduplicating symbols. Now the
deduplication happens after the symbols are filtered. As a alternative we might
change the way cached symbols are stored(e. g. use set).
- I also fixed the way globalSymbols work. Now it will sort the responses based
on the match location to make sure that the results are sorted in user friendly way.
* Update nimsuggest/nimsuggest.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-10-06 07:18:46 +02:00
Andreas Rumpf
9d858a29fc
cleanup nfFirstWrite flags ( #20500 )
2022-10-05 11:50:16 +02:00
ringabout
3e2b30879c
fixes #19231 ; newFinalize doesn't work with ORC ( #20291 )
...
* fixes #19231 ; newFinalize doesn't work with ORC
first make it pass tests
* remove the tables dep
creates a binding for finalized procs in order to handle the same symbols. It used to wrongly generat a new symbol id for the same symbol as the encountered one before
* refactor and revert #14257
* de indentation
* fixes tests; uses instantiated types
2022-10-05 10:35:40 +02:00
ringabout
f89ba2c951
add default field support for object in ARC/ORC ( #20480 )
...
* fresh start
* add cpp target
* add result support
* add nimPreviewRangeDefault
* reduce
* use orc
* refactor common parts
* add tuple support
* add testcase for tuple
* cleanup; fixes nimsuggest tests
* there is something wrong with cpp
* remove
* add support for seqs
* fixes style
* addd initial distinct support
* remove links
* typo
* fixes tuple defaults
* add rangedefault
* add cpp support
* fixes one more bugs
* add more hasDefaults
* fixes ordinal types
* add testcase for #16744
* add testcase for #3608
* fixes docgen
* small fix
* recursive
* fixes
* cleanup and remove tuple support
* fixes nimsuggest
* fixes generics procs
* refactor
* increases timeout
* refactor hasDefault
* zero default; disable i386
* add tuples back
* fixes bugs
* fixes tuple
* add more tests
* fix one more bug regarding tuples
* more tests and cleanup
* remove messy distinct types which must be initialized by original types
* add tests
* fixes zero default
* fixes grammar
* fixes tests
* fixes tests
* fixes tests
* fixes comments
* fixes and add testcase
* undo default values for results
Co-authored-by: flywind <43030857+xflywind@users.noreply.github.com >
2022-10-04 12:45:10 +02:00
ringabout
0f5ad49971
[ARC] fixes #18645 ; C Compiler error when initializing {.global.} with a block ( #19953 )
...
* fixes #18645 ; C Compiler error when initializing {.global.} with a block:
* arguably cleaner solution
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
Co-authored-by: Araq <rumpf_a@web.de >
2022-10-03 16:12:23 +02:00
metagn
2cca38d33c
pragma for sfCallsite instead of name check + better semantics, test ( #20464 )
...
* pragma for sfCallsite instead of name check at every template definition
Not documented because it seems to be for internal use?
Should also make it possible to make comparisons and setops imports, but this doesn't have to be done.
I can reuse a name like `cursor` for the pragma as well, added a new name just to be safe.
* make sfCallsite recursive, add tests
2022-10-03 06:07:55 +02:00
ringabout
81e7811e01
fixes nim check with orc ( #20456 )
...
* fixes nim check with orc
* fixes tests
* add tests
* fixes tests
* Update tests/arc/t20456.nim
2022-10-02 06:44:10 +02:00
ringabout
1737bb9f9e
disable threads when booting the compiler ( #20478 )
2022-10-02 06:42:09 +02:00
Bung
567c3f055d
Fix #19224 For loops over a hardcoded empty array crash the compiler ( #20476 )
...
* Fix #11684 For loops over a hardcoded empty array crash the compiler
* Update t19224.nim
2022-10-01 23:19:07 +02:00
Bung
cbd9fee22a
fix #19678 Broken behavior with string ranges in case labels ( #20475 )
...
* fix #19678 Broken behavior with string ranges in case labels
* Update compiler/semtypes.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-10-01 18:17:07 +02:00
Andreas Rumpf
8d47bf1822
new move analyser2 ( #20471 )
...
* produce better code for closure environment creation
* new 'first write' analysis;
* scope based move analyser
* code cleanup
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
2022-10-01 16:46:51 +02:00
metagn
cfff454cf9
closed ambiguous enum defaults to first overload ( #20457 )
...
* closed ambiguous enum defaults to first overload
* add warning
* turn to hint
* work around config
2022-10-01 13:30:23 +02:00
metagn
24b81e9df6
remove hack for deprecated csize in compiler ( #20463 )
...
* remove hack for deprecated csize in compiler
* remove test
2022-10-01 09:07:52 +02:00
ringabout
96c5586d03
add plausibleAnalytics support for koch docs[backport:1.6] ( #20454 )
...
add plausibleAnalytics to koch docs[backport:1.6]
2022-09-30 12:39:28 +02:00
ringabout
ae050b05e9
koch boot compiler with orc ( #20467 )
...
* koch boot compiler with orc
* use orc
* workaround bugs
* move it
* move the data
2022-09-30 12:38:25 +02:00
ringabout
a8cc5d1379
Unicode Operators are no longer experimental ( #20444 )
...
* Unicode Operators are no longer experimental
* fixes tests
* Update doc/manual.md
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2022-09-28 22:37:26 +02:00
metagn
919a889ba8
moderate system cleanup & refactor ( #20355 )
...
* system refactor, move out 600 lines
* compilation, slice, backwardsindex, misc_num moved out of system
* some procs/types moved into arithmetics, basic_types
* system no longer depends on syncio
* some procs moved around to fit with their surroundings
* make exceptions an import, old ops to misc_num
* move instantiationInfo back
* move back nim version, fix windows echo
* include compilation
* better docs for imported modules, fix unsigned ops
also remove ze, ze64, toU8, toU16, toU32 with nimPreviewSlimSystem
* fix terminal
* workaround IC test & weird csize bug, changelog
* move NimMajor etc back to compilation, rebase for CI
* try ic fix
* form single `indices`, slim out TaintedString, try fix IC
* fix CI, update changelog, addQuitProc
* fix CI
* try fix CI
* actually fix CI finally hopefully
* Update lib/system/compilation.nim
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
* update kochdocs
* hopefully fix csize uses for slimsystem
* fix tquit
Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com >
2022-09-28 15:28:45 -04:00
Tomohiro
92a0f191bf
Use vccexe when generating static lib with vcc ( #19843 )
2022-09-28 15:07:41 +02:00
metagn
de4b0346bd
store full definition AST for consts, fix noRewrite ( #20115 )
...
* continue #9582 for consts, close #9331 , fix #20114
also move extractPragma to ast to pave the way for things like {.strdefine: "abc".} etc
* changelog correctly
* fix jsgen
* update tgetimpl
* fix sighashes
* fix #19766 , add comment about postfix
* fix noRewrite LOL
refs #16620
* fix changelog
* fix destructors
2022-09-28 15:05:01 +02:00
ringabout
fdc6b0fb6e
fixes #19986 ; mutable view from immutable location ( #20134 )
...
* fixes #19986 ; mutable view from immutable location
* fixes the tests
2022-09-28 14:02:07 +02:00
konsumlamm
18cea8e9bd
Update message for checking cast ( #20145 )
...
* Update message for checking `cast`
* Update error messages in tests
2022-09-28 13:59:27 +02:00
ringabout
e33e9e4a32
fixes #20141 ; dereferencing pointer to incomplete type error with cast ( #20147 )
...
Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com >
2022-09-28 13:57:47 +02:00
ringabout
fe8feb46c6
fixes #19457 seqs are not properly updated in loop with ARC/ORC ( #19922 )
...
* test CI
* fixes #19457
* add comments
Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com >
2022-09-28 13:12:08 +02:00
ringabout
80e739f2bf
fixes #19401 ; fixes #19402 ; rework Forward declaration and finalizer for ORC ( #20295 )
...
* fixes #19401 ; fixes #19402 ; rework Forward declaration and finalizer for ORC
* add more tests
* give it a name
* make more tests
* fixes tests
* hidden addr for cpp
* move code to a function
2022-09-27 20:07:26 +02:00