summary refs log tree commit diff stats
path: root/compiler/importer.nim
Commit message (Collapse)AuthorAgeFilesLines
* fix #18986; Import/except doesn't work on devel [backport: 1.6] (#19687)flywind2022-04-061-1/+1
| | | | | * fix #18986; Import/except doesn't work on devel [backport: 1.6] * add testcase
* move assertions out of system (#19599)flywind2022-03-231-0/+3
|
* fixes a converter handling regression that caused private converters to leak ↵Andreas Rumpf2021-12-091-2/+4
| | | | into client modules; fixes #19213; [backport:1.6] (#19229)
* followup #18362: make `UnusedImport` work robustly (#18366)Timothee Cour2021-06-271-4/+12
| | | | * warnDuplicateModuleImport => hintDuplicateModuleImport * improve DuplicateModuleImport msg, add test
* even lighter version of #17938: fix most issues with UnusedImport, ↵Timothee Cour2021-06-261-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* `import foo {.all.}` reboot (#17706)Timothee Cour2021-04-161-17/+50
|
* IC: added converter test case (#17688)Andreas Rumpf2021-04-091-3/+6
| | | | | * IC: added converter test case * IC: make converter example work
* IC: bugfixes (WIP) (#16836)Andreas Rumpf2021-02-021-4/+4
| | | | | | | | * minor improvements * IC: added the required logic for compilerProcs * LazySym ftw * we need this testing logic * reimplement the old way we use for module package creation * fixes a regression; don't pick module names if you can avoid it
* IC: next steps (#16550)Andreas Rumpf2021-01-071-19/+8
| | | | | | | | | | | | | | | | | | * 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/+2
| | | | | | | | | | | | | | | | | | | * 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-40/+127
| | | | | | | | | | | | | | * 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-1/+1
| | | | | | | | | | | | | | | | | * 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)
* compiler: minor code cleanupsAraq2020-07-271-2/+1
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-26/+26
| | | | | | | | | | | | | | | | | | * 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
* fixes #5050; fixes #11826 (#12606) [backport]cooldome2019-11-071-0/+4
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-3/+3
| | | | | * Remove sonsLen * Use Indexable
* fixes 'unused module' feature for 32 bit builds of Nim for good [nobackport]Araq2019-08-091-2/+2
|
* fixes #11809Andreas Rumpf2019-08-081-11/+12
|
* fixes #11790 [nobackport]Araq2019-07-191-1/+1
|
* Merge branch 'devel' into araq-detect-unused-importsAndreas Rumpf2019-07-181-2/+2
|\
| * [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-2/+2
| |
* | [feature] detect unused importsAraq2019-07-171-0/+1
|/
* styleCheck: make the compiler and large parts of the stdlib compatible with ↵Araq2019-07-101-1/+1
| | | | --styleCheck:error
* fixes #3333Andreas Rumpf2019-07-061-6/+6
|
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-4/+4
|
* Fix 105, few fixes for 101 (#11148)genotrance2019-05-041-1/+1
|
* Deprecate gc v2 (#10151)Neelesh Chandola2019-01-011-2/+2
| | | | | | * Deprecate gc v2 * warnDeprecated now has custom messages
* Nimsuggest now shows gotodef for y in `from x import y` (#10023)Neelesh Chandola2018-12-181-0/+1
|
* IC: further progressAraq2018-11-221-1/+1
|
* compiler refactoring; use typesafe path handing; docgen: render symbols ↵Andreas Rumpf2018-09-071-8/+6
| | | | between modules
* fixes #8852Araq2018-09-031-5/+5
|
* fixes #8066Araq2018-08-311-2/+8
|
* Fix nkImportAs regression (#8796)Oscar Nihlgård2018-08-281-9/+14
|
* Fix for module alias inside brackets (#8726)Oscar Nihlgård2018-08-231-7/+19
|
* incremental compilation: implemented basic replay logicAndreas Rumpf2018-06-021-11/+13
|
* baby steps for incremental compilationAndreas Rumpf2018-05-301-2/+3
|
* refactoring: remove idents.legacy global variable and pass the IdentCache ↵Andreas Rumpf2018-05-271-2/+2
| | | | around explicitly
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-1/+1
|
* preparations of making compiler/msgs.nim free of global variablesAndreas Rumpf2018-05-171-2/+2
|
* fixes testament compilationAraq2018-05-141-5/+8
|\
| * implement the export/except statementZahary Karadjov2018-05-071-5/+8
| |
* | options.nim: no global variables anymoreAndreas Rumpf2018-05-131-1/+2
| |
* | make nimsuggest compile againAndreas Rumpf2018-05-131-1/+1
| |
* | pragmas compiles againAndreas Rumpf2018-05-111-17/+17
|/
* the 'deprecated' pragma for modules now supports an error messageAraq2018-04-061-1/+4
|
* Jump to definition on import will open the imported module (#7155)Yuriy Glukhov2018-01-311-2/+2
|
* make type vs proc ambiguous handling more consistent; fixes #6726; fixes #6693Araq2017-12-151-1/+1
|
* Add sections (type, var, let, const, using) support for reorder pragma (#6326)BigEpsilon2017-10-281-73/+1
|
* implemented new experimental scriptable import mechanismAndreas Rumpf2017-10-011-10/+40
|