summary refs log tree commit diff stats
path: root/tests/macros
Commit message (Collapse)AuthorAgeFilesLines
* add legacy workaround; improve test so that it actually tests for the bugfixTimothee Cour2020-06-191-31/+7
|
* Update tuple newLitsolo9892020-06-191-0/+32
|
* Implement rendering of `[]=`, `{}`, `{}=` braces (#14539)cooldome2020-06-011-1/+14
| | | | | | | * render curly braces * fix typo * fix test Co-authored-by: cooldome <ariabushenko@bk.ru>
* => supports pragmas & names (+ changed behavior) (#14200)hlaaftana2020-05-031-16/+15
| | | | | | | | | | * => supports pragmas & names (+ changed behavior) (x, y: int) is now parsed as (x: int, y: int) instead of (x: auto, y: int) inside => and ->. * fix pragma check * fixes, use since & LHS of -> supports pragmas
* update tests that tested for the 'discard' error messagesAraq2020-05-021-8/+8
|
* Fix typeSym.getImpl for ref types (#13752)zah2020-03-261-2/+82
| | | | | | | | | | | | | | | | | | | | | * Fix typeSym.getImpl for ref types * Fix a codegen issue affecting the test suite of nim-beacon-chain * Fix tests/stdlib/tjsonmacro To understand the fix better it may help to take a look at the history of the replaced code. The nil check that is removed in this commit was introduced in another fix that failed to identify the root cause of the issue - namely that we allow an object type to exist for which no ast is present: https://github.com/nim-lang/Nim/pull/9601/files The original intention of the code is more obvious here: https://github.com/nim-lang/Nim/pull/9538/files
* fix deprecations and other warnings (#13748)Miran2020-03-251-4/+4
|
* add expectIdent to macros (#12778)Arne Döring2020-03-112-0/+42
| | | | | | | | | | | | | | | | * add expectIdent to macros * apply feedback * Update lib/core/macros.nim Co-Authored-By: Clyybber <darkmine956@gmail.com> * Update texpectIdent2.nim * Update texpectIdent1.nim Co-authored-by: Clyybber <darkmine956@gmail.com> Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fix several bugs with `repr` (#13386)Timothee Cour2020-02-111-0/+17
|
* fix #12740 (#12774)Arne Döring2019-12-041-0/+43
| | | | | | | | | | * fix #12740 * A different kind of a hack * proper fix * fix typo
* fix regression in align (#12680)Arne Döring2019-11-191-0/+14
| | | | | | * fix regression in align * add test typesym without type
* backtick and export marker handling in `eqIdent` (#12574)Arne Döring2019-11-071-0/+16
|
* remove unused imports from testsnarimiran2019-11-065-9/+4
|
* remove deprecated procs (#12535)Andreas Rumpf2019-11-051-2/+2
|
* macros.newLit now works for ref object types (#12307)zah2019-09-301-0/+25
|
* Fix spellings (#12277) [backport]Federico Ceratto2019-09-272-2/+2
|
* fix range.getType crashJasper Jenkins2019-09-051-5/+10
|
* Implement isExported for symbols in macros (#11963)nc-x2019-08-181-0/+10
| | | | | | | | * Implement isExported for macros * Reimplement isExported using VM callback mechanism * VM does not support exceptions, use stacktrace() instead.
* Lock semchecked ast for macros (#11883) [bugfix]Arne Döring2019-08-084-6/+44
| | | | | | * reject to modify type checked AST * add flag to back out * Introduce legacy feature set.
* Fixes #11662: render ops priority (#11664)cooldome2019-07-051-0/+5
|
* fix for passing tuples as static params to macros (#11423); fixes #10751 ↵Arne Döring2019-06-071-0/+12
| | | | | | | | [bugfix] * add vm value preparation proc * small optimization
* fix macrocache implementation (#11404)andri lim2019-06-051-1/+53
| | | | | | * macrocache improvements * fix macrocache implementation
* intVal works now on enum field symbols (#11403)Arne Döring2019-06-051-0/+11
| | | | | | * intVal works now on enum field symbols * disable flakey titerators test
* added a nice test case for macro based lookup tablesAraq2019-06-041-0/+28
|
* close #8573 by adding a testnarimiran2019-05-301-0/+35
|
* Remove immediate pragma (#11308)Arne Döring2019-05-292-8/+6
| | | | | * remove immediate from tests * remove immediate from the compiler
* fix megatestnarimiran2019-05-291-0/+1
|
* rename a file, so that megatest doesn't complainnarimiran2019-05-291-0/+0
|
* close #7792 by adding a testnarimiran2019-05-291-0/+36
|
* close #7615 by adding a testnarimiran2019-05-291-0/+32
|
* Allow void macro result (#11286)Arne Döring2019-05-215-15/+90
| | | | | * allow void macro result * add test for void macro result type
* fix for return in macro (#9666); fixes #5874Arne Döring2019-05-203-6/+28
|
* fixes #11131Andreas Rumpf2019-05-131-0/+8
|
* forbid casting to bare unchecked array (#11186)Arne Döring2019-05-081-2/+2
| | | | | * fixes #11180, forbid casting to unchecked array. * allow UncheckedArray as param
* add progmas to params of macros.newProc (#11025)Lolo Iccl2019-04-271-0/+51
| | | Merging
* revert parser stmtListExpr (#11007)cooldome2019-04-171-3/+2
| | | | | | | | | | | | | | | | | * Revert "Support for stmtListExpr in parser after major keywords. Scaled down version. (#10852)" This reverts commit 862897dc0f122e374c0e4d44770ffcd8825e51e3. * redo fix for #4035 * render stmtlistExpr using semicolon * Revert "render stmtlistExpr using semicolon" This reverts commit cafb78b8d5b125b5f6ba94248377a1433b3138cb. * revert test
* Compiler plugin for implementing incremental computation in user space (#10819)cooldome2019-04-111-0/+150
| | | | | | | | | | This plugin provides essential building block for implementing incremental computations in your programs. The idea behind incremental computations is that if you do the same calculation multiple times but with slightly different inputs you don't have to recompute everything from scratch. Also you don't want to adopt special algorithms either, you would like to write your code in standard from scratch manner and get incrementality for free when it is possible. The plugin computes the digest of the proc bodies, recursively hashing all called procs as well . Such digest with the digest of the argument values gives a good "name" for the result. Terminology loosely follows paper "Incremental Computation with Names" link below. It works well if you have no side effects in your computations. If you have global state in your computations then you will need problem specific workarounds to represent global state in set of "names" . SideEffect tracking in Nim also useful in this topic. Classical examples: Dashboard with ticking data. New data arrives non stop and you would like to update the dashboard recomputing only changed outputs. Excel spreadsheet where user changes one cell and you would like to recompute all cells that are affected by the change, but do not want to recompute every cell in the spreadsheet.
* Support for stmtListExpr in parser after major keywords. Scaled down ↵cooldome2019-03-181-2/+3
| | | | | | | version. (#10852) * Support for stmtListExpr in parser after major keywords * fixes #4035
* fixes #10805 (#10806)cooldome2019-03-131-0/+5
|
* fixes #10807 (#10814)cooldome2019-03-121-1/+11
| | | | | * fixes #10807 * use nkAddr instead of nkHiddenAddr
* fixes #10702 (#10705)Andreas Rumpf2019-02-181-2/+32
| | | | | | * --define:nimQuirky exception handling for Nim; in preparation of a blog post * make it work with latest system.nim * make code more readable * fixes #10702
* fix #10591 regression (#10592)Timothee Cour2019-02-061-1/+1
|
* Reject assignments with nkEmpty RHS (#9000)LemonBoy2019-02-061-0/+26
| | | Fixes #8997
* Avoid evaluating macros twice in type sections (#10550)LemonBoy2019-02-061-0/+15
| | | Fixes #10548
* fix #10339 by returning type attached to nkEmpty (#10370)Vindaar2019-01-231-0/+15
| | | | | | | | | | | | | | | * fix #10339 by checking for nkObjConstr * revert check for nkObjConstr, return type from nkEmpty node The correct type needed in `semObjConstr` to fix #10339 is indeed available, but attached to an `nkEmpty` node. These were previously discarded in `semTypeNode`, which is used to extract the type for the object. * simplify return of PType from `nkEmpty` * also fixes #9866, add test case
* make megatest greenAraq2019-01-131-2/+1
|
* closes #3744Araq2019-01-131-0/+11
|
* fixes #10075 [backport]Araq2019-01-131-1/+30
|
* megatest: make it green on LinuxAraq2018-12-111-0/+1
|
* Testament: refactoring; makes the test joiner greenAraq2018-12-111-0/+1
|