Commit Graph

1520 Commits

Author SHA1 Message Date
Federico Ceratto
7533f3bcbd Add link to nims.html (#10472) [ci skip] 2019-01-27 17:27:54 +01:00
Matt Haggard
3c106541fa Increase verbosity of logGC (#10449)
* Increase verbosity of logGC

* Remove & c.repr to avoid re-entering the GC
2019-01-26 12:26:36 +01:00
Araq
70c7348d3e gc:regions: undo the regression introducing changes 2019-01-25 09:49:16 +01:00
Araq
c4d2cb9ea6 excpt.nim: code cleanup, don't produce nimFrame in -d:release mode 2019-01-23 22:03:15 +01:00
Araq
40d1c7d43a OutOfMemError is never raised so there is no need to check for it (produce less code) 2019-01-23 22:03:15 +01:00
Araq
458c827077 make --define:noSignalHandler compile again 2019-01-22 11:45:45 +01:00
LemonBoy
7a3f382517 Fix corner case of checked div/mod on x86 (#10406)
Fixes #10377
2019-01-22 07:33:27 +01:00
Andreas Rumpf
f7c0360aba allocators: introduce --define:nimMinHeapPages for tuning mmap calls (omg they are slow on OSX...) 2019-01-19 12:48:39 +01:00
Reimer Behrends
06e3d3ab4d Disable interior pointer checking by default for the Boehm GC. (#10316)
The Boehm GC only needs interior pointer checking if pointers in global
variables or on the heap point to the interior of an object rather than
the beginning. If this does not happen, then checking for interior
pointers causes additional overhead, in particular because any objects
whose sizes are an exact multiple of two words gain another two words of
padding, wasting memory.

If checking of interior pointers is still desired, this can be achieved
by setting the environment variable GC_ALL_INTERIOR_POINTERS.

Pointers on the stack will always be treated as potential interior
pointers, as compiler optimizations may advance the only live reference
to a point past the beginning of an object.
2019-01-15 19:00:02 +01:00
genotrance
c707267212 Add stdin read support to nimscrit #3983 (#10292) 2019-01-14 09:26:10 +01:00
Araq
451377f737 fixes #10271 [backport] 2019-01-13 14:24:38 +01:00
Araq
5cd18b0f24 make system.task compatible with NimScript; refs #10254 2019-01-13 09:04:57 +01:00
Araq
647066e378 make the stdlib work with the changed docgen 2019-01-11 22:17:43 +01:00
Vindaar
8e600b78ca add unsetControlCHook to remove a Ctrl-C hook after it was set (#7267)
* add unsetControlCHook to remove a Ctrl-C hook after it was set

Adds the inverse proc to setControlCHook in order to lift a Ctrl-C
hook after it has been set.

* remove check for noSignalHandler in system/excpt.nim
2019-01-10 13:44:44 +01:00
Timothee Cour
6ce3949c8a add isNamedTuple; make $(1, 2) be (1, 2) instead of (Field0: 1, Field1: 2) which leaked implementation detail (#10070)
* add `isNamedTuple`; make $(1, 2) be (1, 2) instead of leaking implementation detail (Field0: 1, Field1: 2)
  fixes this: #8670 (comment) /cc @alehander42 @Vindaar @mratsim

* Note: isNamedTuple is useful in other places, eg #10010 (comment)

* move isNamedTuple to helpers.nim to avoid exposing new symbol to system.nim

* remove workaround in tests/vm/tissues.nim failing test now that #10218 was makes it work
2019-01-08 18:37:25 -08:00
alaviss
20402579a2 system/strmantle: avoid leaking docs to system.nim [ci skip] (#10233)
thanks @timotheecour for spotting this
2019-01-08 08:42:10 +01:00
alaviss
be0a4d1342 fix system.nim documentations (#10168)
* system: fix nimGC_getStackBottom doc
* system/helpers: avoid leaking docs to system
2019-01-04 15:13:07 +01:00
rec
ba7d33b4e4 Guard against null exception (#10162) 2019-01-04 15:05:03 +01:00
Andreas Rumpf
cb9110c43d --define:nimQuirky exception handling for Nim; in preparation of a blog post 2019-01-03 18:56:05 +01:00
Timothee Cour
eba8ffcf70 checkErr now shows actual system error msg instead of unknown error (#9987) 2018-12-27 22:46:53 +01:00
Andreas Rumpf
cd65e5328d GC: avoid pathological behaviour; fixes #10040 [backport] (#10052) 2018-12-20 08:20:32 +01:00
Neelesh Chandola
48437d0a84 Give better error message when profiler and memProfiler used at same time (#9948)
* Give better error message when profiler and memProfiler used at same time

* Move to profiler.nim
2018-12-19 10:02:20 +01:00
Andreas Rumpf
d7d17d5ab0 see what breaks with a global config.nims (#10016)
* see what breaks with a global config.nims

* make tests green with a global config.nims file
2018-12-18 09:29:15 +01:00
Timothee Cour
c4e3c4ca2d add getCurrentCompilerExe to vmops (eg allows to get nim compiler at CT); add tests for vmops (#9925) 2018-12-18 09:07:12 +01:00
Araq
09b9a54418 make tests green with a global config.nims file 2018-12-17 23:03:54 +01:00
Araq
d91d1865b8 fixes #9420 2018-12-16 20:11:04 +01:00
Araq
359a4b5fac timers.nim: avoid parser warning 2018-12-14 09:56:43 +01:00
Andreas Rumpf
5dc83d0c8f cleanup of excpt.nim 2018-12-11 23:04:49 +01:00
Andreas Rumpf
e3d91a5b74 Merge pull request #9923 from stefantalpalaru/calldepth
replace misleading "stack overflow" message when reaching Nim's call depth limit
2018-12-11 22:07:44 +01:00
Ștefan Talpalaru
497e8c41e8 replace misleading "stack overflow" message on call depth limit
The new error message looks like this:
"Error: call depth limit reached in a debug build (2000 function calls).
You can change it with -d:nimCallDepthLimit=<int> or switch to a release
build with -d:release."
2018-12-10 19:35:37 +01:00
Timothee Cour
f3ecc15a94 refs #9880 show index and bound in lots of index out of bounds errors 2018-12-09 16:50:45 -08:00
rec
e3e5ae287f Fix fat pointers, object copying, magic double evals on JS (#9411) [backport]
* Add a test for issue #9389

* Fixes #9389.

* Make object contructors copy objects properly by checking whether the expressions passed to them don't need to be copied.
* Make mArrToSeq implementation actually check if a copy needs to be made.

* Avoid unnecessary copy in mChr impl

* Assume set constructor elements need no copy

* Add a test for issue #9410

* Add a test

* fix passing fat pointers (#9410)

* Enhance tests

* More tests and fixes

* Add more (failing) tests [ci skip]

* Added equality operator for fat pointers, more tests and fixes

* Fix printing uninitialized strings

* Fix mInc, mDec double eval, add more tests

* Tests

* Refactored, fixed multiple evals, revamped the tests, added missing ops

* Fix ups

* Fix #9643 and #9644

* add pointer normalization
2018-12-04 12:04:27 +01:00
Jacek Sieka
87568830ab Remove dead code (#9777)
* gc/gc2: remove unused ref counting stuff
* also removes some false threading support - hasSharedHeap is always
false in gc/gc2
* gc: remove some threading cruft
* remove asgnRefNoCycle
* compiler: remove TLoc.dup (unused)
2018-11-26 09:47:39 +01:00
alaviss
c7eba64dee don't raise exception in the default handler (#9783)
fixes #9657
2018-11-22 14:46:07 +01:00
Araq
3f6168b337 removes deprecated T/P types 2018-11-16 13:27:56 +01:00
Araq
dd3e1cbc9b make testament compile again with -d:nimCoroutines 2018-11-15 15:15:20 +01:00
Andreas Rumpf
632ec94b5d gc_common: fixes a typo 2018-11-15 11:36:35 +01:00
Andreas Rumpf
8d850f7a69 deprecated ospaths (#9665) 2018-11-09 16:36:49 +01:00
Araq
5c25b93898 change system.nim to adhere to the style guide 2018-10-30 15:03:28 +01:00
cooldome
dfb8730f51 Implements #9434. Minimal Stacktrace for Exceptions in release mode (#9480)
* Fixes #9434
2018-10-28 13:40:42 +01:00
recloser
2b03bed2db Fix printing and comparing uninitialized strings 2018-10-21 21:18:10 +02:00
Vindaar
e190f485ae fixes #9456 by only calling c_fclose if non nil 2018-10-20 20:35:04 +02:00
Timothee Cour
7d8e281239 [nimscript] document currentSourcePath in thisDir (#9402) 2018-10-18 12:18:40 +02:00
Yuriy Glukhov
dc72cf7564 No setjump in GC for emscripten/wasm (#9386) 2018-10-17 00:46:13 +02:00
LemonBoy
72cd3b7914 Fix repr() for UncheckedArray (#9385) 2018-10-16 14:27:42 +02:00
LemonBoy
71636059e9 Avoid memory allocation during dynlib loading (#9320)
By using `write` instead of `rawWrite` we'd end up asking the compiler
to generate the GC dynlib _while_ we were already generating another
dynlib!

Fixes #9123
2018-10-12 08:56:14 +02:00
Ștefan Talpalaru
10f5f67767 gogc: GCC-8.2.0 compatibility and other improvements (#9211)
- Go's write barriers are now plugged-in in all the relevant points
- "gcGo" is correctly classified by usesWriteBarrier()
- some gogc structures and functions now use golib wrappers to keep GCC
  version-specific conditions out of the compiler/stdlib code
- we no longer allow mixing the C malloc with Go's
- fix a problem with string copying
2018-10-11 22:15:17 +02:00
Solitude
027a11d7c8 Add procs to retrieve project name, directory and full path to nimscript (#9274) 2018-10-11 09:56:12 +02:00
LemonBoy
334032294f Fix linking issue in cpp codegen
Declare the root symbol only once and have the other modules depending
on it emit an `extern` declaration.

Fixes #9013
2018-09-19 12:46:50 +02:00
skilchen
e317745098 don't reuse code from 0.18.0 2018-09-15 14:05:42 +02:00