summary refs log tree commit diff stats
path: root/compiler
Commit message (Collapse)AuthorAgeFilesLines
* fixes #18558 (#18563)Andreas Rumpf2021-07-231-16/+28
| | | | | * fixes #18558 * better fix
* Fixed template const tuple unpacking (#18562)Jason Beetham2021-07-231-22/+18
|
* mitigates #12815 (#18557)Andreas Rumpf2021-07-222-2/+8
| | | | | | | | | * mitigates #12815 * Update doc/nimc.rst Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fixes #12815 (#18554)Andreas Rumpf2021-07-223-3/+8
|
* fix setCommand so it behaves like regular nim invocation (#18555)Timothee Cour2021-07-223-18/+12
|
* fixes #18550 (#18553)Andreas Rumpf2021-07-214-1/+36
| | | | | * fixes #18550 * update the manual to reflect reality
* undo RFC #294, it breaks code for no good reason, the compiler can wa… ↵Andreas Rumpf2021-07-213-5/+3
| | | | | | | | | | | | | (#18546) * undo RFC #294, it breaks code for no good reason, the compiler can warn about the construct instead * Update changelog.md Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com> * enable test case Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com>
* fixes #18469 (#18544)Andreas Rumpf2021-07-203-15/+30
| | | | | * fixes #18469 * Update compiler/injectdestructors.nim
* make -d:nimFpRoundtrips work consistently in vm vs rt, fix #18400, etc (#18531)Timothee Cour2021-07-209-37/+44
| | | | | | * compiler/vmhooks: add getVar to allow vmops with var params * addFloat vmops with var param * cgen now renders float32 literals in c backend using roundtrip float to string
* rst: add missing line/column info for some warnings (#18383)Andrey Makarov2021-07-203-56/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * rst: add missing line/column info for some warnings * add workaround * use TLineInfo/FileIndex for storing file names * fix blank lines in include file (rm harmful strip) * don't use ref TLineInfo * return `hasToc` as output parameter for uniformity * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * address review - stylistic things * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * unify RST warnings/errors names * doAssert + minor name change * fix a bug caught by doAssert * apply strbasics.strip to final HTML/Latex * rm redundant filename * fix test after rebase * delete `order` from rnFootnoteRef, also display errors/warnings properly when footnote references are from different files * Update compiler/lineinfos.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rstast.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * revert because of error: Error: cannot prove that it's safe to initialize 'info' with the runtime value for the discriminator 'kind' * Update lib/packages/docutils/rstgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * apply suggestion * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * add Table for string->file name mapping * do not import compiler/lineinfos * fix ambiguous calls Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> Co-authored-by: narimiran <narimiran@disroot.org>
* minor clenup in vmops (#18529)Timothee Cour2021-07-191-4/+5
|
* nim doc now correctly renders deprecated pragmas for routines and types (#18515)Timothee Cour2021-07-193-14/+36
|
* Make error message for empty new-styled concept more descriptive (#18506)konsumlamm2021-07-182-8/+9
| | | | | | | * Allow empty new-styled concept Slightly improve error messages * Make empty new-styled concepts an error
* Add changes required by Nimble lock file support (#12104)Ivan Bobev2021-07-152-31/+53
| | | | | | | | | | | | | | | | Implemented support for Nimble local cache with package directories with a checksum of the package at the end of their names. Now the compiler supports package paths in the form: * /path_to_nimble_cache_dir/pkgs/package_name-1.2.3- FEBADEAEA2345E777F0F6F8433F7F0A52EDD5D1B * /path_to_nimble_cache_dir/pkgs/package_name-#head- 042D4BE2B90ED0672E717D71850ABDB0A2D19CD2 * /path_to_nimble_cache_dir/pkgs/package_name-#branch-name- DBC1F902CB79946E990E38AF51F0BAD36ACFABD9 Related to nim-lang/nimble#127
* Extended side effect error messages (#18418)quantimnot2021-07-152-17/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Extended side effect error messages * Applied feedback: - refactored `markSideEffect` - refactored string interpolations - single message - skip diagnostics in `system.compiles` context Other: - started a test of diagnostic messages [ci skip] Tests aren't updated yet because messaging isn't nailed down. * - Added hints of where for side effect call locations. - Tried to clarify the reasons. * fix tests * Applied PR review feedback: - moved collection of side effects from TSym to TContext - used pragma shorthand form `.sideEffect` and `.noSideEffect` in messages - added leading '>' to structured messages for readability - changed `sempass2.markSideEffect` to a proc - replaced `system.echo` in the test to make the test compatible with Windows * Applied NEP1 formatting suggestion Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* fixes #17893 (#18485)Andreas Rumpf2021-07-131-6/+1
| | | * fixes #17893
* closes #18433 (#18484)Andreas Rumpf2021-07-132-6/+4
| | | | | * beneficial refactoring; use system.Endianness * closes #18433
* ORC: support for custom =trace procs (#18459)Andreas Rumpf2021-07-098-8/+35
| | | | | | | | | | | * ORC: support custom =trace procs (WIP) * Update tests/arc/tcustomtrace.nim Co-authored-by: Clyybber <darkmine956@gmail.com> * =trace is now documented and seems to work * make test green Co-authored-by: Clyybber <darkmine956@gmail.com>
* runnableExamples now show originating location in stacktraces on failure ↵Timothee Cour2021-07-092-11/+25
| | | | | | | | | (#18457) * runnableExamples now show originating location in stacktraces on failure * PRTEMP * fix indentation inside multiline strings
* improve `--declaredLocs` to help disambiguate types (generics, aliases etc) ↵Timothee Cour2021-07-084-9/+15
| | | | | | | | | (#18389) * improve --declaredlocs to help disambiguate types (generics, aliases etc) * avoid a cyclic deps * fix test after rebase
* followup #18252: show special flags -d:danger, -d:release when given (#18451)Timothee Cour2021-07-081-0/+4
|
* ORC: use =destroy instead of =dispose (#18440)Andreas Rumpf2021-07-074-47/+12
| | | | | | * ORC refactoring in preparation for further changes (=dispose must die) * ORC: embrace =destroy, avoid =dispose * ORC: no need for =dispose * closes #18421
* Make procedure mismatch more informative with pragma/call convention ↵Jason Beetham2021-07-063-32/+96
| | | | | | | | | | | | | | | | | | mismatches (#18384) * Added more concise calling convention/pragma mismatch messages * Now only adds callConvMsg/lock message when sensible * Fixed message formatting * Added tests, and fixed some bugs * Tests joined, and always indenting * More tests and more bug fixes * Fixed first test in tprocmismatch * Using var param for writting mismatches * Better logic for handling proc type rel and conv/pragma mismatch * Refactored getProcConvMismatch * Fixed callConv message formatting * Fixed test for proper message * Cleanup to address issues * getProcConvMismatch now returns tuple, and reformatted code
* [minor]remove unnecessary stringify (#18419)flywind2021-07-021-4/+4
|
* fixes #18030 (#18415)Andreas Rumpf2021-07-011-1/+1
|
* fixes #18130 (#18407)Andreas Rumpf2021-07-011-1/+1
|
* genDepend: fix for module names that are reserved DOT keywords (#18392)Ștefan Talpalaru2021-06-301-1/+1
| | | (like "node" and "edge")
* improvements to hint:processing: show import stack, distinguish nims, show ↵Timothee Cour2021-06-305-16/+26
| | | | | | | | includes etc (#18372) * improvements to hint:processing * fix tests; do not show hintProcessing for nimscript unless given -d:nimHintProcessingNims * fix trunner and avoid need for -d:nimHintProcessingNims * fix some tests
* fixes #16270 (#18388)Andreas Rumpf2021-06-293-3/+10
|
* Cleanup lookups.nim again.. (#18379)Clyybber2021-06-281-4/+4
|
* Fix #16426 (#18377)Clyybber2021-06-281-5/+8
|
* fixes #18319 (#18375)Andreas Rumpf2021-06-281-2/+12
|
* followup #18362: make `UnusedImport` work robustly (#18366)Timothee Cour2021-06-2710-24/+32
| | | | * warnDuplicateModuleImport => hintDuplicateModuleImport * improve DuplicateModuleImport msg, add test
* even lighter version of #17938: fix most issues with UnusedImport, ↵Timothee Cour2021-06-264-23/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XDeclaredButNotUsed, etc; fix #17511, #17510, #14246 (without realModule) (#18362) * {.used: symbol} * add tests * fix tests with --import * --import works without giving spurious unused warnings * new warning warnDuplicateModuleImport for `import foo; import foo` * fix test, add resolveModuleAlias, use proper line info for module aliases * fix spurious warnings * fix deprecation msg for deprecated modules even with `import foo as bar` * disable a test for i386 pending sorting XDeclaredButNotUsed errors * UnusedImport now works with re-exported symbols * fix typo [skip ci] * ic support * add genPNode to allow writing PNode-based compiler code similarly to `genAst` * fix DuplicateModuleImport warning * adjust test * fixup * fixup * fixup * fix after rebase * fix for IC * keep the proc inline, move the const out * [skip ci] fix changelog * experiment: remove calls to resolveModuleAlias * followup * fixup * fix tests/modules/tselfimport.nim * workaround tests/deprecated/tmodule1.nim * fix properly * simplify
* fixes #18240 (#18354)Andreas Rumpf2021-06-251-12/+25
| | | | | * ORC: track escaping parameters properly * fixes #18240
* fixes #18287 (#18346)Andreas Rumpf2021-06-251-24/+24
|
* fixes #18320 (#18343)Andreas Rumpf2021-06-242-4/+6
| | | | | * TSymFlag has 47 flags already * fixes #18320
* enable VM tracing in user code via `{.define(nimVmTrace).}` (#18244)Timothee Cour2021-06-243-2/+9
| | | | | | | * enable VM tracing in user code via `{.define(nimVmTrace).}` * add vmutils.vmTrace * add vmTrace
* fix #18334: handle path with spaces on windows during bootstrap (#18337)Timothee Cour2021-06-241-12/+15
|
* fix #18332: XDeclaredButNotUsed hints now in deterministic order (#18336)Timothee Cour2021-06-241-4/+6
|
* fixes #18326 (#18335)Andreas Rumpf2021-06-231-2/+2
| | | | | * fixes #18326 * make tests green again
* fix #18327 (#18328)flywind2021-06-221-1/+1
|
* fix #18310 system.== in vm for NimNode (#18313)Timothee Cour2021-06-211-5/+6
| | | | | | | * fix #18310 == in vm * fixup * fixup
* followup #17852, disallow all:on for now (#18311)Timothee Cour2021-06-201-0/+2
|
* validate rst field for :number-lines:, :status: (#18304)Andrey Makarov2021-06-202-0/+3
|
* support `--hint:all:off --hint:x` (ditto with `--warnings` + friends) (#17852)Timothee Cour2021-06-202-31/+30
| | | | | * select all hints via `--hint:all:on|off`, etc * simplify code with setutils * address comment
* move {.injectStmt.} to experimental; add a test (#18300)Timothee Cour2021-06-201-2/+3
| | | | | * move {.injectStmt.} to experimental; add a test * undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
* docgen: move to shared RST state (fix #16990) (#18256)Andrey Makarov2021-06-205-88/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * docgen: move to shared RST state (fix #16990) * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update lib/packages/docutils/rst.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update compiler/docgen.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * Update lib/packages/docutils/rst.nim Co-authored-by: Timothee Cour <timothee.cour2@gmail.com> * rename `cmdDoc2` to `cmdDoc` * fix (P)RstSharedState convention * new style of initialization * misc suggestions * 1 more rename * fix a regression Co-authored-by: Andreas Rumpf <rumpf_a@web.de> Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
* make privateAccess work with generic types and generic instantiations; fix a ↵Timothee Cour2021-06-192-4/+26
| | | | | SIGSEGV (#18260) Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* refs #18278: do not gag fatal msgs (#18290)Timothee Cour2021-06-184-12/+21
|