Commit Graph

419 Commits

Author SHA1 Message Date
Andreas Rumpf
3f4b9971fc newruntime: only check for dangling refs when 'owned ref T' support is enabled 2019-11-03 09:46:49 +01:00
Kaushal Modi
d914e9a65f [backport] Add docs to better distinguish among getProjectPath, getCurrentDir and currentSourcePath (#12565)
Fixes https://github.com/nim-lang/Nim/issues/10477.
2019-10-31 21:00:18 +01:00
Andreas Rumpf
1746da2d9e --gc:destructors now means Nim uses pure refcounting (#12557) 2019-10-30 16:15:17 +01:00
zah
de5f6a07c2 Fix newLit for objects having string fields (#12542) [backport] 2019-10-28 22:45:55 +01:00
Jjp137
72147c9ba4 Prefer relative links for Nim documentation
This is more friendly to those browsing the documentation without
a network connection. The nim-doc package in Debian allows this,
for example.

Also, the domain name being used was not consistent. It could have
been either nim-lang.org or nim-lang.github.io, and those reading
the stable docs could have found themselves suddenly reading the
devel docs instead.
2019-10-22 17:59:12 -07:00
Timothee Cour
2446570350 fixes #12330 (#12331) 2019-10-02 17:57:24 +02:00
Jasper Jenkins
c20778d2d3 Macro docs additions (#12270)
* small macros doc additions

* more changes

* fixes [ci skip]

* capitalization, couple additions

* nkNodeKind to nnkNodeKind
2019-10-01 08:55:26 -04:00
zah
a4ade43536 macros.newLit now works for ref object types (#12307) 2019-09-30 22:24:57 +02:00
Federico Ceratto
39290cf88c Fix spellings (#12277) [backport] 2019-09-27 07:02:54 +02:00
Ray Imber
9dd297f613 Locks modules should give a compile error when threads are not enabled. (#12231)
* Locks modules should give a compile error when threads are not enabled.

* fix the compile flags to make the tests pass, or ignore files where necessary.

* Fixed when statement to account for doc builds.
2019-09-26 15:45:50 +02:00
Araq
5abe880469 last stdlib cleanups 2019-09-21 06:43:37 +02:00
Araq
05e80e1cda lib\pure\htmlgen.nim
avoid callsite for htmlgen
2019-09-21 06:43:37 +02:00
Arne Döring
188ce5f3ee add nodeId proc to macros (#11456)
* add nodeId proc to macros

* add doc comment.

* fix typo
2019-09-18 20:02:30 +02:00
Andreas Rumpf
3f87453981 fixes a weird quote do regression 2019-09-16 12:12:44 +02:00
Yuriy Glukhov
5d9c1544bf Allow ProcTy in addPragma and friends (#12158) 2019-09-10 07:54:51 +02:00
Araq
ad82e65387 gc:destructors progress 2019-09-01 23:28:26 +02:00
Andreas Rumpf
ce7f29e8e6 fixes #11833 (#12018) 2019-08-24 06:25:47 +02:00
Andreas Rumpf
b07694cd90 new gensym handling (#11985)
* 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
2019-08-23 16:15:02 +02:00
nc-x
d5840e1e3d Implement isExported for symbols in macros (#11963)
* Implement isExported for macros

* Reimplement isExported using VM callback mechanism

* VM does not support exceptions, use stacktrace() instead.
2019-08-18 11:51:28 +02:00
Timothee Cour
922e2a5098 refs #11956 (#11957) 2019-08-16 07:19:34 +02:00
Andreas Rumpf
433613e267 fixes #11844 (#11935) 2019-08-13 06:37:37 +02:00
Andreas Rumpf
212ae2f125 fixes #11891 2019-08-10 15:41:24 +02:00
Araq
7024bb800c fixes #11844 2019-08-04 23:54:29 +02:00
Jörg Wollenschläger
903d06bab8 Fix the range of destroyed elements when shrinking a seq (#11785) 2019-07-19 16:46:47 +02:00
Kaushal Modi
dcbb2d66da Fix compilation warning in macros.nim
Fixes:

> macros.nim(1423, 35) Warning: `typed` will change its meaning in future versions of
  Nim. `void` or no return type declaration at all has the same
  meaning as the current meaning of `typed` as return type declaration. [Deprecated]
2019-07-16 15:03:44 -04:00
Araq
416ba133ad made --newruntime ready for multi-threading 2019-07-12 21:53:46 +02:00
Araq
c94647aeca styleCheck: make the compiler and large parts of the stdlib compatible with --styleCheck:error 2019-07-10 12:42:41 +02:00
Andreas Rumpf
124a584eb2 fixes #11530 2019-07-08 19:40:42 +02:00
awr1
6a7f8e8ab5 [HCR] Added warning for using performCodeReload() in main module (#11667)
* [HCR] Added error for using performCodeReload() in main module

* [HCR] changed this to a warning, clarified usage

* [HCR] fixed typo
2019-07-07 09:18:33 +02:00
Andreas Rumpf
f310cf5250 [other] added system.dispose for owned refs 2019-06-20 19:40:18 +02:00
Andreas Rumpf
c65a5d754b [bugfix] owned closures (#11544) 2019-06-20 07:40:45 +02:00
Arne Döring
1a074fffa4 change newLit on Seq (#11542) 2019-06-19 20:14:54 +02:00
Jasper Jenkins
bda9fd149c [refactoring] error instead of quit for basename (#11491) 2019-06-13 19:34:41 +02:00
Arne Döring
efbf43d4a9 intVal works now on enum field symbols (#11403)
* intVal works now on enum field symbols

* disable flakey titerators test
2019-06-05 14:55:47 +02:00
Jasper Jenkins
71388caf2e remove stdlib case transitions (#11401) 2019-06-05 08:04:29 +02:00
LemonBoy
7d217a71d3 Render deprecated pragmas (#8886)
* Render deprecated pragmas
* fix the expected html
* clean up the documentation regarding deprecations
* fix typo
* fix system.nim
* fix random
2019-06-03 10:15:20 +02:00
Arne Döring
35593700fa fix doccomment of macros.get{Size,Align,Offset} [ci skip] (#11346) 2019-05-28 15:57:27 +02:00
Arne Döring
f94ec363ab Allow void macro result (#11286)
* allow void macro result
* add test for void macro result type
2019-05-21 21:31:40 +02:00
Araq
a60305fbf3 fixes macros.quote documentation; doubling of the escape operator never worked! 2019-05-05 12:20:43 +02:00
Lolo Iccl
69755542f4 add progmas to params of macros.newProc (#11025)
Merging
2019-04-27 12:22:02 +01:00
Araq
8e27bddb97 newruntime: make 'discard new RootObj' work 2019-04-26 20:33:58 +02:00
Araq
1f7615ad9d make seq.add more effective for --newruntime 2019-04-25 13:54:25 +02:00
Andreas Rumpf
7ce24d91a3 newruntime: fix for -d:useMalloc 2019-04-23 21:26:43 +02:00
Araq
4f93669754 fixes #11065 2019-04-22 10:11:37 +02:00
Jasper Jenkins
a68c5662f2 Add len check for newIfStmt to avoid segfault (#11032) 2019-04-15 17:02:25 +02:00
cooldome
041d15392a Compiler plugin for implementing incremental computation in user space (#10819)
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.
2019-04-11 23:09:11 +02:00
Araq
bc50795d9c enable most tnewruntime_strutils tests 2019-04-10 15:49:04 +02:00
Araq
a34ce2714a newruntime: fixes another bug 2019-04-10 13:53:47 +02:00
Araq
2430521c84 newruntime: fixes memory leak 2019-04-09 12:20:10 +02:00
Araq
0a01f5b655 strs.nim: fixed a silly typo 2019-04-09 11:21:35 +02:00