summary refs log tree commit diff stats
path: root/compiler/semgnrc.nim
Commit message (Collapse)AuthorAgeFilesLines
* fixes #20572 (#20585)Andreas Rumpf2022-10-171-1/+1
| | | | | * fixes #20572 * added a test case
* overloadable enums no longer experimental (#20298)metagn2022-09-051-5/+1
| | | depends on #20126
* Change `styleCheck` to ignore foreign packages (#19822)quantimnot2022-07-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Change `styleCheck` to ignore foreign packages * Symbols from foreign packages are now ignored. * Fixed `styleCheck` violations in `compiler` package. * Added symbol ownership to custom annotation pragmas. * Minor refactors to cleanup style check callsites. * Minor internal documentation of reasons why a symbol isn't checked. Style violations were fixed in the compiler after thet were exposed by the changes. The compiler wouldn't compile otherwise. Symbol ownership for custom pragma annotations is needed for checking the annotation's style. A NPE was raised otherwise. Fixes #10201 See also nim-lang/RFCs#456 * Fix a misunderstanding about excluding field style checks I had refactored the callsites of `styleCheckUse` to apply the DRY principle, but I misunderstood the field access handling in a template as a general case. This corrects it. * Fix some `styleCheck` violations in `compiler/evalffi` The violations were exposed in CI when the compiler was built with libffi. * Removed some uneeded transitionary code * Add changelog entry Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
* fixes #18769 (#18790)Andreas Rumpf2021-09-031-1/+7
|
* Fixed const tuples in inferred generics (#18598)Jason Beetham2021-07-271-17/+16
|
* refactoring: removed empty withBracketExpr template (#18152)Andreas Rumpf2021-06-021-4/+2
|
* fix #17941: UnusedImport works for var/let/const/type invoked inside a ↵Timothee Cour2021-05-081-0/+3
| | | | | | | generic (#17942) * fix #17941: UnusedImport works for var/let/const/type invoked inside a generic * fixup
* potential fix for semgeneric formal params (#17494)Saem Ghani2021-03-241-2/+4
| | | | marked locations where analysis of return formal param is done prior to args. This might fix some subtle bugs.
* IC: next steps (#16550)Andreas Rumpf2021-01-071-1/+1
| | | | | | | | | | | | | | | | | | * cleanups * ast.nim: cleanups * IC: no more sym.tab field, stored externally in the module graph * nimble compiles again * rodfiles: store bitwidth of integers and the endianness in the cookie because we serialize 'int' directly * rodfiles: added compilerproc and export sections * rodfiles: added all the missing sections * rodfiles: track the missing information * IC: architecture for lazy loading of proc bodies * make tests green again * completed the lazy loading of proc bodies * symbol lookup integration, part 1 * symbol lookup integration, part 2 * symbol lookup integration, part 3 * make tcompilerapi work again * rodfiles: fixed config change handling
* big steps torwards an efficient, simple IC implementation (#16543)Andreas Rumpf2021-01-021-1/+1
| | | | | | | | | | | | | | | | | | | * reworked ID handling * the packed AST now has its own ID mechanism * basic serialization code works * extract rodfiles to its own module * rodfiles: store and compare configs * rodfiles: store dependencies * store config at the end * precise dependency tracking * dependency tracking for rodfiles * completed loading of PSym, PType, etc * removed dead code * bugfix: do not realloc seqs when taking addr into an element * make IC opt-in for now * makes tcompilerapi green again * final cleanups Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
* refactorings to prepare the compiler for IC (#15935)Andreas Rumpf2020-12-171-5/+7
| | | | | | | | | | | | | | * added ic specific Nim code; WIP * make the symbol import mechanism lazy; WIP * ensure that modules can be imported multiple times * ambiguity checking * handle converters and TR macros properly * make 'enum' test category green again * special logic for semi-pure enums * makes nimsuggest tests green again * fixes nimdata * makes nimpy green again * makes more important packages work
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-5/+5
| | | | | | | | | | | | | | | | | * refactoring: idents don't need inheritance * refactoring: adding an IdGenerator (part 1) * refactoring: adding an IdGenerator (part 2) * refactoring: adding an IdGenerator (part 3) * refactoring: adding an IdGenerator (part 4) * refactoring: adding an IdGenerator (part 5) * refactoring: adding an IdGenerator (part 5) * IdGenerator must be a ref type; hello world works again * make bootstrapping work again * progress: add back the 'exactReplica' ideas * added back the missing exactReplica hacks * make tcompilerapi work again * make important packages green * attempt to fix the build for 32 bit machines (probably need a better solution here)
* Fix #5691 (#15158)Clyybber2020-08-271-1/+1
| | | | | | | | * Fix #5691 * Cleanup and thoughts * Use scope approach * Seperate defined/declared/declaredInScope magics * Fix declaredInScope * Update spec accordingly
* fix bug in semgnrc: runnableExamples should not semcheck, even with > 1 arg ↵Timothee Cour2020-06-231-1/+1
| | | | (#14768)
* implement the 'bind' statement for generics, it was an oversight that this ↵Andreas Rumpf2020-06-071-4/+11
| | | | was never implemented (#14584)
* fix #13524 astToStr now works inside generics (#13681)Timothee Cour2020-03-181-1/+1
|
* make case-object transitions explicit, make unknownLineInfo a const, replace ↵Jasper Jenkins2020-01-171-1/+1
| | | | a few magic numbers with consts (#13170)
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-117/+111
| | | | | | | | | | | | | | | | | | * Cleanup compiler code base * Unify add calls * Unify len invocations * Unify range operators * Fix oversight * Remove {.procvar.} pragma * initCandidate -> newCandidate where reasonable * Unify safeLen calls
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-21/+21
| | | | | * Remove sonsLen * Use Indexable
* refs #11947; FieldError fixed (#11950)Timothee Cour2019-08-151-1/+1
|
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-2/+2
| | | | --styleCheck:error
* fixes #11188 (#11319)Andreas Rumpf2019-05-241-2/+2
|
* Replace countup(x, y) with x .. yClyybber2019-05-071-6/+6
|
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-15/+15
|
* more destructor based changes (#10885)Andreas Rumpf2019-03-231-1/+1
| | | | | | | | | | | * mark user defined destructors with sfOverriden to simplify the logic * refactoring in preparation to merge liftings and generic instantiations for destructors * ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on * renamed 'patterns' switch to 'trmacros' as it was totally misleading before * destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking * test for invalid/too late destructor introductions * liftdestructors: make code robust for nimsuggest * --newruntime works for hello world again * newruntime: code generation for closures
* Fixes #10727. (#10728)deech2019-02-251-1/+6
|
* added first version of a nimfind tool for the poor souls that don't have a ↵Andreas Rumpf2018-11-141-11/+12
| | | | good nimsuggest integretation
* fixes #8603Araq2018-10-301-1/+8
|
* Fix regression with runnableExamples in generic exprLemonBoy2018-09-301-5/+5
| | | | | | | | The examples should not enter the generic analysis at all. The regression was introduced in 4cf704bb as a fix for #8694. Fixes #9130 Fixes #8694
* fixes #8694Andreas Rumpf2018-09-021-2/+2
|
* Fix use of custom pragmas in generic procs (#8165)LemonBoy2018-07-011-1/+2
| | | Fixes #7626
* fixes #7222; fixes #5595; fixes #3747Zahary Karadjov2018-06-161-11/+20
| | | | | | | | | | * late instantiation for the generic procs' default param values * automatic mixin behaviour in concepts Other fixes: * don't render the automatically inserted default params in calls * better rendering of tyFromExpr
* implements a --nep1:on switch to make the compiler enforce the naming ↵Andreas Rumpf2018-06-131-1/+1
| | | | conventions outlined in NEP-1
* refactoring: remove idents.legacy global variable and pass the IdentCache ↵Andreas Rumpf2018-05-271-8/+8
| | | | around explicitly
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-3/+3
|
* options.nim: no global variables anymoreAndreas Rumpf2018-05-131-1/+1
|
* semstmts compiles againAndreas Rumpf2018-05-121-40/+40
|
* first steps in adding template/macro calls to stack tracesAraq2017-12-211-1/+1
|
* Merge branch 'devel' into araqAndreas Rumpf2017-11-071-0/+2
|\
| * minor breaking change: for loop bodies now get their own scopeAndreas Rumpf2017-11-051-0/+2
| |
* | wipAndreas Rumpf2017-11-021-1/+1
|/
* first implementation of the 'func' keywordAndreas Rumpf2017-09-231-3/+3
|
* .pure enums are much more convenient to use nowAndreas Rumpf2017-09-171-0/+4
|
* introduce a pre-processing pass for the concept bodiesZahary Karadjov2017-06-201-3/+10
| | | | | | | fixes #4982 fixes #3805 close #3414
* fixes #5597; wrong eager template instantiation in generic context (#5601)Andreas Rumpf2017-03-241-3/+3
|
* make tests green againAndreas Rumpf2017-03-021-0/+8
|
* fixes #5419Andreas Rumpf2017-02-241-1/+5
|
* More progress towards a working #3691.Dominik Picheta2017-02-031-6/+4
|
* WIP: `as` with generics.Dominik Picheta2017-02-021-1/+10
|
* recursive modules are only detected to improve error messagesAndreas Rumpf2016-11-241-2/+2
|