summary refs log tree commit diff stats
path: root/compiler/semdata.nim
Commit message (Collapse)AuthorAgeFilesLines
* IC: next steps (#16632)Andreas Rumpf2021-01-121-10/+35
| | | | | | | | | | | | | * removed dead code * beginnings of a rodfile reader * IC: record global VM state changes and pragma state changes * IC: replay pragmas and VM state changes * implemented rod load file simuation for easier, extensive testing * critical bugfix * IC: stress test logic; should also help with recursive module dependencies; WIP * IC: loading from .rod files begins to work reliably * removed ugly hacks * yet another silly mistake
* IC: next steps (#16550)Andreas Rumpf2021-01-071-4/+18
| | | | | | | | | | | | | | | | | | * 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-9/+36
| | | | | | | | | | | | | | | | | | | * 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/+19
| | | | | | | | | | | | | | * 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-17/+18
| | | | | | | | | | | | | | | | | * 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)
* Expand hoisted default params in sem (#15270)Clyybber2020-09-051-5/+3
| | | | | | | | | * Expand hoisted default params in sem Introduce ast.newTree{I,IT} Add test for default params in procs * Cleanup * Simplify hoist transformation and expand test
* Use typeflag insteadClyybber2020-08-101-1/+1
|
* Make explicit {.nimcall.} a seperate calling conventionClyybber2020-08-081-1/+1
|
* Fix forward declaration issues in template/macro context (#15091)Clyybber2020-07-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | * Fix forward declaration issues in template/macro context * Correct forward declaration resolving for overloads * Remove old dead code * WIP consistent gensym ids * Minimize diff * Remove obsoleted hack * Add templInstCounter to give unique IDs to template instantiations * Remove obsoleted code * Eh, init in myOpen, not myProcess... * Remove optNimV019 * Add testcase for #13484
* fix #11009 (#14935)flywind2020-07-091-0/+1
|
* no more code duplication bw liMessage and rawMessage + several bug fixes ↵Timothee Cour2020-05-221-1/+2
| | | | | | | (#14415) * no more code duplication bw rawMessage and liMessage; fixes some bugs in rawMessage * all compiler messages work with hint:msgorigin
* Implements RFCs #209 (#13995)cooldome2020-04-161-2/+5
| | | | | * add test * add changelod entry Co-authored-by: cooldome <ariabushenko@bk.ru>
* new feature: ability to turn specific warnings to errorsAndreas Rumpf2020-04-041-0/+4
|
* The raises list can now use expressions referencing the generic paramsZahary Karadjov2020-04-011-0/+2
|
* Replace tfHasRequiresInit with a more accurate mechanismZahary Karadjov2020-04-011-0/+1
| | | | | | | | | The new mechanism can deal with more complex scenarios such as not nil field appearing in a non-default case object branch or a field within a generic object that may depend on a when branch. The commit also plugs another hole: the user is no longer able to create illegal default values through seq.setLen(N).
* Fix tests/parallel/tguard2.nimZahary Karadjov2020-04-011-1/+1
|
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-13/+10
| | | | | | | | | | | | | | | | | | * 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-2/+17
|
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-2/+2
| | | | | * Remove sonsLen * Use Indexable
* fixes 'unused module' feature for 32 bit builds of Nim for good [nobackport]Araq2019-08-091-4/+2
|
* make tests green again on 32bit systemsAraq2019-08-091-1/+1
|
* fixes #11809Andreas Rumpf2019-08-081-0/+3
|
* int128 on firstOrd, lastOrd and lengthOrd (#11701)Arne Döring2019-08-071-3/+3
| | | | * fixes #11847
* makes the -d:nimIncremental compiler mode compile againAndreas Rumpf2019-07-271-1/+1
|
* revert changesAndrii Riabushenko2019-07-251-3/+0
|
* fixes #11826Andrii Riabushenko2019-07-251-0/+3
|
* Merge branch 'devel' into araq-detect-unused-importsAndreas Rumpf2019-07-181-5/+2
|\
| * [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-5/+2
| |
* | [feature] detect unused importsAraq2019-07-171-1/+3
|/
* Smarter variant object construction (#11273)Jasper Jenkins2019-05-261-0/+10
|
* rename tyExpr/tyStmt to tyUntyped/tyTyped (#11227)Arne Döring2019-05-111-1/+1
|
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-1/+1
|
* destructors: internal compiler refactoringAraq2019-04-181-6/+0
|
* fixes #10930Andreas Rumpf2019-03-301-0/+1
|
* more destructor based changes (#10885)Andreas Rumpf2019-03-231-0/+2
| | | | | | | | | | | * 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
* destructors: first step towards fixing #9617 (#10341)cooldome2019-01-181-0/+7
|
* compiler refactoring: TSymSeq is gone for goodAraq2018-12-111-3/+3
|
* Fix overload resolution for pragmas evaluation (#8902)LemonBoy2018-10-091-1/+4
| | | | Fixes #6448 Fixes #4384
* change runnableExamples implementation; fixes #8641; fixes #7135; ↵Andreas Rumpf2018-09-021-1/+0
| | | | runnableExamples works for templates and generics
* allow .experimental in a .push/pop environment; refs #8676Araq2018-08-271-0/+1
|
* WIP: disallow 'nil' for strings and seqsAndreas Rumpf2018-08-131-2/+5
|
* Implement the `is` operator for the new static and typedesc type classesZahary Karadjov2018-06-161-1/+2
| | | | | | | | | This also makes the first baby steps towards a sound treatment of higher-order kinds (type type int). Adds test cases showcasing the new features. * Also fixes breakage after the rebase
* baby steps for incremental compilationAndreas Rumpf2018-05-301-1/+1
|
* 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
|
* make semantic checking free of globalsAndreas Rumpf2018-05-181-0/+2
|
* preparations of making compiler/msgs.nim free of global variablesAndreas Rumpf2018-05-171-1/+1
|
* fixes testament compilationAraq2018-05-141-0/+1
|\
| * A motivating example for the new `bindSym` behavior.Zahary Karadjov2018-05-071-0/+1
| | | | | | | | | | | | | | | | The example is a proof-of-concept logging library, allowing you to define lexically-scoped environments where certain logging attributes are applied automatically to all logging statements. fixes tmacro1 (use of `bindSym` inside static blocks)
* | options.nim: no global variables anymoreAndreas Rumpf2018-05-131-2/+3
| |