summary refs log tree commit diff stats
path: root/tests/macros
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* lots of small changesArne Döring2018-12-111-1/+1
|
* megatest can be executedArne Döring2018-12-111-0/+0
|
* require errormsg to be specified before file.Arne Döring2018-12-114-4/+1
|
* fixes #9864 [backport]Araq2018-12-051-0/+36
|
* cleanup tests; don't use non-working 'msg' spec fieldAraq2018-11-238-28/+34
|
* activated more tests, allow input in test specArne Döring2018-11-231-2/+4
|
* make run the default action of a test in testerArne Döring2018-11-233-2/+44
|
* Add isInstanceOf for generic procs to the macros module (#9730)cooldome2018-11-211-0/+19
|
* Add proc `[]`(n: NimNode, s: HSlice[T, U]): seq[NimNode] to macros (#7735)Lolo Iccl2018-11-101-0/+38
| | | fixes #7670.
* newLit works on enum (#9662)Arne Döring2018-11-091-0/+20
| | | | | | * newLit works on enum * remove debugging echo
* adopt testsArne Döring2018-11-081-8/+7
|
* fixes #9600 (#9601)jcosborn2018-11-071-0/+11
|
* Quote do now works with result in block (#7343)PMunch2018-10-311-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix result not being able to use in quote do This fixes the annoying issue of not be able to use result inside a quote do block. It works by a simple trick. The quote do mechanic is based on dynamically creating a template and immediately calling it with the arguments found within the quote do block. Since this is called in the scope of the macro the result variable is shadowed. This trick works by changing all occurences of result (which shouldn't cause any issues as result isn't used for anything else for the same reason) to another name and then passing in an IdentNode with result as a named parameter with that name. Note that currently this just replaces it with a fixed named variable "res" which should be changed to a non-colliding, dynamically created name. * Fix hard coded parameter "res" to anonymous symbol This fixes the hard coded parameter "res" to be an anonymous symbol instead so it won't collide with other parts of the argument list. * Add test case for result in quote do block A simple test case based on GitHub issue #7323 on how you can't put result in a quote do block. This test verifies that it actually works correctly now. * Add test for explicit capturing of result * Rebased against devel
* getTypeImpl now returns pragmas for object types (#9538)jcosborn2018-10-301-0/+18
|
* More descriptive names of test files (#9531)Miran2018-10-292-0/+0
| | | | | * change generic `tissues` name to more specific * change `tvarious` to more specific names
* Change the order of compilation passes, transformation is made lazy at code ↵cooldome2018-10-181-1/+1
| | | | | | | | | | | | | | | gen (#8489) * Ast no transformation * Add getImplNoTransform to the macros module * progress on delaying transf * Fix methods tranformation * Fix lazy lambdalifting * fix create thread wrapper * transform for lambda lifting * improve getImplTransformed * Fix destructor tests * try to fix nimprof for linux
* added test case for `or` operatorArne Döring2018-10-181-0/+14
|
* merge macros tests (#9367)Miran2018-10-1417-373/+352
|
* compiler: show name of instantiating context in error traces (#6763) (#9207)xzfc2018-10-111-1/+1
|