summary refs log tree commit diff stats
path: root/compiler/evaltempl.nim
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* explicit ID generation for easier IC (#15559)Andreas Rumpf2020-10-251-1/+4
| | | | | | | | | | | | | | | | | * 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 forward declaration issues in template/macro context (#15091)Clyybber2020-07-291-3/+7
| | | | | | | | | | | | | | | | | | | | | | | * 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
* Cosmetic compiler cleanup (#12718)Clyybber2019-11-281-18/+18
| | | | | | | | | | | | | | | | | | * 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
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-271-1/+1
|
* Small ast.nim cleanup (#12156)Clyybber2019-09-091-2/+2
| | | | | * Remove sonsLen * Use Indexable
* fixes #12121 (#12126)Andreas Rumpf2019-09-051-1/+1
|
* new gensym handling (#11985)Andreas Rumpf2019-08-231-3/+11
| | | | | | | | | | | * new .gensym implementation * make astspec test green again * introduce a --useVersion switch to group compatibility switches * fixes #10180 * fixes #11494 * fixes #11483 * object constructor fields and named parameters are also not gensym'ed * disabled broken package
* [refactoring] remove unused imports in the compiler and in some stdlib modulesAraq2019-07-181-2/+1
|
* Remove immediate pragma (#11308)Arne Döring2019-05-291-1/+1
| | | | | * remove immediate from tests * remove immediate from the compiler
* Replace countup(x, y-1) with x ..< yClyybber2019-05-071-3/+3
|
* fixes #10192Araq2019-05-061-1/+1
|
* it's spelt callsiteAndreas Rumpf2019-02-221-1/+1
|
* 32 bit fixes (#10608)Arne Döring2019-02-131-4/+3
|
* fixes nested gensym'ed parameters; fixes #9476Araq2018-12-081-4/+10
|
* IC: further progressAraq2018-12-011-1/+1
|
* docgen: fixes #9432 [backport]Araq2018-10-311-0/+20
|
* baby steps for incremental compilationAndreas Rumpf2018-05-301-1/+1
|
* remove more global variables in the Nim compilerAndreas Rumpf2018-05-271-5/+4
|
* remove ast.emptyNode global; cleanup configuration.nimAraq2018-05-161-1/+1
|
* fixes testament compilationAraq2018-05-141-1/+1
|\
| * Better support for treating templates and macros as symbols.Zahary Karadjov2018-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows you to pass a template or a macro to another macro which can then inspect the implementation of the former template/macro using `getImpl`. Since templates can be freely redefined, this allows you to treat their symbols as compile-time variables that have lexical scope. A motivating PoC example for a logging library taking advantage of this will be provided in the next commit. Implementation details: * The name of a template or a macro will be consider a symbol if the template/macro requires parameters * For parameterless templates/macros, you can use `bindSym`, which was extended to also work outside of compile-time procs.
* | more modules compile againAndreas Rumpf2018-05-121-1/+1
| |
* | more modules compile againAndreas Rumpf2018-05-121-10/+18
|/
* allow setting template/macro recursive evaluation limits (#7652)jcosborn2018-04-191-2/+3
| | | | | | | * allow setting template/macro recursive evaluation limits * revert setting template/macro eval limits set them to 1000
* first steps in adding template/macro calls to stack tracesAraq2017-12-211-3/+7
|
* Fix usage of parameters types in templates #6756 (#6768)Anatoly Galiulin2017-11-291-1/+1
|
* deprecated unary '<'Andreas Rumpf2017-10-291-1/+1
|
* Fix #4020; Better handling of templates within conceptsZahary Karadjov2017-06-201-0/+2
|
* lift parameter-less do block to lambdasZahary Karadjov2017-04-101-5/+1
|
* fix the do notation when used with procsZahary Karadjov2017-04-091-1/+5
|
* Fixes #5167 and related problems (#5475)zah2017-03-121-0/+5
| | | | | | | | | This commit returns to a bit less strict checking of the number of macro arguments, because some old immediate macros rely on a behavior where even the arity of the macro is not being checked. It may be better if such macros are just declared to use varargs[expr], but this remains for another day.
* macros are now checked to not produce cyclic ASTsAndreas Rumpf2017-02-081-1/+0
|
* make tests green againAraq2016-12-181-1/+1
|
* fixes #4308, fixes #4905Araq2016-12-181-1/+20
|
* hotfix: don't crash for wrong template callsAndreas Rumpf2016-06-031-1/+1
|
* remove funny debug outputAndreas Rumpf2016-05-271-1/+0
|
* fixes #4227Andreas Rumpf2016-05-271-4/+5
|
* Merge pull request #3500 from nanoant/patch/fix-3498-generic-args-in-tmplAndreas Rumpf2016-01-141-1/+2
|\ | | | | fixes #3498
| * fixes #3498Adam Strzelecki2015-10-301-1/+2
| | | | | | | | | | | | | | | | | | Previously it was not possible to use template arguments in template body as the symbols were not resolved correctly leading to Error: undeclared identifier: 'XX', eg.: template defaultOf[T](t: T): expr = (var d: T; d) echo defaultOf(1) #<- invalid identifier, but should output 0
* | better nimsuggest supportAraq2015-11-031-4/+4
|/
* fixes #3359Araq2015-09-231-3/+2
|
* compiler: Trim .nim files trailing whitespaceAdam Strzelecki2015-09-041-3/+3
| | | | via OSX: find . -name '*.nim' -exec sed -i '' -E 's/[[:space:]]+$//' {} +
* Disable the new generic params handling for immediate template and macrosZahary Karadjov2015-08-021-1/+11
| | | | | | | | | | | | | | Since immediate templates are not subjected to the standard sigmatching algorithm, they will have a number of deficiencies when it comes to generic params: Type dependencies between the parameters won't be honoured and the bound generic symbols won't be resolvable within their bodies. We could try to fix this, but it may be wiser to just deprecate immediate templates and macros now that we have working untyped parameters. Disabling the new features is admittedly not the greatest way to handle this situations as it introduces inconsistency in the language, but at least it makes the code backwards-compatible with the previous version of the compiler instead of triggering more serious problems.
* fix #1858 again; restores the support for static macro paramsZahary Karadjov2015-08-021-16/+34
|
* fixes #3044Araq2015-07-021-1/+3
|
* fixes #1940; code breakage! stricter template evaluationAraq2015-03-071-5/+5
|
* nimsuggest improvementsAraq2015-01-301-1/+1
|
* fixes #1915Araq2015-01-121-1/+1
|