summary refs log tree commit diff stats
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* [std/os] split and re-export (#20593)ringabout2022-10-201-3/+6
| | | | | | | * [std/os] split and export * move to private modules * fixes docs and tests Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* [backport] Handle nkOpenSymChoice for nkAccQuoted in considerQuotedIdent ↵SirOlaf2022-10-181-0/+5
| | | | | | | | | | | | (#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>
* refactor envvars, oserrors; register vmops (#20592)ringabout2022-10-181-7/+10
| | | | | * refactor envvars, oserrors; register vmops * remove type definitions
* fixes #20572 (#20585)Andreas Rumpf2022-10-1723-69/+85
| | | | | * fixes #20572 * added a test case
* Fix #12517 Allow single branch when nimvm statements (#20577)Can Lehmann2022-10-171-3/+6
| | | Allow single branch when statements
* Fix "imported but not used" warnings (#20575)Andrey Makarov2022-10-166-7/+7
|
* fixes #20515; base `method` requires explicit `{.gcsafe.}` to be GC-safe ↵ringabout2022-10-161-4/+12
| | | | | | | (#20574) * fixes #20515; base requires explicit `{.gcsafe.}` to be GC-safe * add tests
* fixes #19162; enable `strictEffects` for v2 (#19380)ringabout2022-10-153-9/+6
| | | | | | | | | | | | | | | | | | | * 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
* fix #19700 Crash when passing a template to a generic functio… (#20567)Bung2022-10-151-0/+2
| | | fix nim-lang#19700 Crash when passing a template to a generic function expecting a procedure
* fix #8821 JS codegen can produce extreme switch statements with case … ↵Bung2022-10-141-6/+1
| | | | | | | (#20548) * fix #8821 JS codegen can produce extreme switch statements with case a of range * remove totalRange
* fixes #3748 (#20563)Andreas Rumpf2022-10-142-4/+5
| | | | | | | | | * fixes #3748 * fix the regression * don't use the new allocator for the SSL wrapper * fixes regression
* fixes #20553; don't format code for stropping identifier (#20561) [backport]ringabout2022-10-131-5/+9
| | | | | | | * fixes #20553; don't format code for stropping identifier * add tests * Update nimpretty/tests/expected/simple.nim
* fix #18136 tests/proc/t17157.nim now gives SIGSEGV instead of error (#20555)Bung2022-10-131-0/+1
|
* fix #18990 Regression in proc symbol resolution; Error: attempting to… ↵Bung2022-10-121-2/+2
| | | | | (#20554) fix #18990 Regression in proc symbol resolution; Error: attempting to call routine
* Return error message in output of gorge/staticExec. (#18942)Dominik Picheta2022-10-121-2/+9
| | | | | * Return error message in output of gorge/staticExec. * Document nimLegacyGorgeErrors in changelog.
* fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural' (#20522)Bung2022-10-111-2/+1
| | | | | * fix #7446 Generics: type mismatch 'SomeunsignedInt or Natural' * try fix
* 'lock levels' are deprecated, now a noop (#20539)ringabout2022-10-1110-159/+12
| | | | | * 'lock levels' are deprecated, now a noop * fixes tests
* time to make IC work with ORC (here we go again...) (#20538)Andreas Rumpf2022-10-113-11/+40
| | | works for me
* refactorings (#20536)Andreas Rumpf2022-10-109-16/+16
| | | | | | | * refactoring * refactoring: removed unused macroUsagesSection * enum instead of bool for better readability
* Make rstgen work with gcsafe (#20534)ringabout2022-10-104-5/+9
| | | | | | | | | | | * 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>
* Automatic dereferencing is removed (#20531)ringabout2022-10-103-28/+1
|
* fix #18886 crash on ambiguous proc cast (#20472)Bung2022-10-102-2/+11
| | | | | * fix #18886 crash on ambiguous proc cast * follow suggestion
* fixes #20524; add forbids pragmas to hideable lists (#20525)ringabout2022-10-091-1/+1
| | | | | * fixes #20524; add forbids pragmas to hideable lists * fixes nimdoc
* out parameters: enforce that 'out' is only used as a parameter (#20510)Andreas Rumpf2022-10-071-0/+2
| | | | | | | * out parameters: enforce that 'out' is only used as a parameter * make tables.nim use 'out' parameters * better backwards compat
* remove implicit let/var default initialization (#20508)ringabout2022-10-071-11/+0
|
* DAA and 'out' parameters (#20506)Andreas Rumpf2022-10-0613-49/+76
| | | | | | | | | | | * DAA and 'out' parameters * progress * documented strictDefs and out parameters * docs, tests and a bugfix * fixes silly regression
* correct grammar (ref #20199) and add check for grammar.txt (#20494)ringabout2022-10-061-10/+27
| | | | | | | * correct grammar; ref #20199 * add check for keeping grammar.txt up-to-date * add nimTestGrammar
* Fix/improve handling of forward declarations in nimsuggest (#20493)Ivan Yonchovski2022-10-063-4/+5
| | | | | | | | | | | | | | | | | * 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>
* cleanup nfFirstWrite flags (#20500)Andreas Rumpf2022-10-055-6/+5
|
* fixes #19231; newFinalize doesn't work with ORC (#20291)ringabout2022-10-051-31/+28
| | | | | | | | | | | | | | | * 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
* add default field support for object in ARC/ORC (#20480)ringabout2022-10-0413-77/+266
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [ARC] fixes #18645; C Compiler error when initializing {.global.} with a ↵ringabout2022-10-031-12/+17
| | | | | | | | | | 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>
* pragma for sfCallsite instead of name check + better semantics, test (#20464)metagn2022-10-038-17/+19
| | | | | | | | | | | * 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
* fixes nim check with orc (#20456)ringabout2022-10-021-0/+4
| | | | | | | | | | | * fixes nim check with orc * fixes tests * add tests * fixes tests * Update tests/arc/t20456.nim
* disable threads when booting the compiler (#20478)ringabout2022-10-021-0/+1
|
* Fix #19224 For loops over a hardcoded empty array crash the compiler (#20476)Bung2022-10-011-0/+3
| | | | | * Fix #11684 For loops over a hardcoded empty array crash the compiler * Update t19224.nim
* fix #19678 Broken behavior with string ranges in case labels (#20475)Bung2022-10-011-0/+2
| | | | | | | | | * 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>
* new move analyser2 (#20471)Andreas Rumpf2022-10-0110-670/+439
| | | | | | | | * 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>
* closed ambiguous enum defaults to first overload (#20457)metagn2022-10-015-6/+23
| | | | | | | | | * closed ambiguous enum defaults to first overload * add warning * turn to hint * work around config
* remove hack for deprecated csize in compiler (#20463)metagn2022-10-011-2/+1
| | | | | * remove hack for deprecated csize in compiler * remove test
* add plausibleAnalytics support for koch docs[backport:1.6] (#20454)ringabout2022-09-301-0/+8
| | | add plausibleAnalytics to koch docs[backport:1.6]
* koch boot compiler with orc (#20467)ringabout2022-09-302-2/+1
| | | | | | | | | | | * koch boot compiler with orc * use orc * workaround bugs * move it * move the data
* Unicode Operators are no longer experimental (#20444)ringabout2022-09-282-7/+7
| | | | | | | | | * Unicode Operators are no longer experimental * fixes tests * Update doc/manual.md Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* moderate system cleanup & refactor (#20355)metagn2022-09-282-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Use vccexe when generating static lib with vcc (#19843)Tomohiro2022-09-281-2/+3
|
* store full definition AST for consts, fix noRewrite (#20115)metagn2022-09-2818-62/+85
| | | | | | | | | | | | | | | | | | | | | | | * 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
* fixes #19986; mutable view from immutable location (#20134)ringabout2022-09-281-15/+24
| | | | | * fixes #19986; mutable view from immutable location * fixes the tests
* Update message for checking `cast` (#20145)konsumlamm2022-09-281-5/+5
| | | | | * Update message for checking `cast` * Update error messages in tests
* fixes #20141; dereferencing pointer to incomplete type error with cast (#20147)ringabout2022-09-281-0/+5
| | | Co-authored-by: xflywind <43030857+xflywind@users.noreply.github.com>
* fixes #19457 seqs are not properly updated in loop with ARC/ORC (#19922)ringabout2022-09-281-0/+10
| | | | | | | | | * test CI * fixes #19457 * add comments Co-authored-by: sandytypical <43030857+xflywind@users.noreply.github.com>