Commit Graph

5256 Commits

Author SHA1 Message Date
Andreas Rumpf
46f33515d7 Merge branch 'devel' into faster-nimsuggest 2017-02-24 01:28:50 +01:00
Andreas Rumpf
22789a0bfc fixes #5419 2017-02-24 00:32:14 +01:00
Andreas Rumpf
ac3b312cc6 Merge branch 'devel' into faster-nimsuggest 2017-02-22 16:28:32 +01:00
Emery Hemingway
2ba374f9ab match json.toPretty style with NodeJS's stringify (#5406) 2017-02-21 20:24:55 +01:00
Rokas Kupstys
5aef77a3d3 Removed test code from coro.nim and created three real tests for coroutines 2017-02-20 17:54:15 +02:00
Rokas Kupstys
f80ddbbcc6 Use constant nimCoroutines instead of defined(nimCoroutines)
Variable
2017-02-20 17:24:19 +02:00
Rokas Kupstys
9f8863169a Cleanup of gc code
Cleanups
2017-02-20 17:24:19 +02:00
Rokas Kupstys
d69b701dde Coroutines realtime support 2017-02-20 17:24:19 +02:00
Rokas Kupstys
c3d1b732d6 Reworked gc support for coroutines. Nim now bootstraps with -d:nimCoroutines
Added gc test to coro.nim
Lots of misc improvements and comments in coro.nim
2017-02-20 17:24:19 +02:00
Rokas Kupstys
ce4e9846f0 Iterators test in coroutines 2017-02-20 17:24:19 +02:00
Rokas Kupstys
ff1bf74554 Delete fiber context when it exits (memleak fix)
Few correctness changes to gc stack management.
2017-02-20 17:24:19 +02:00
Rokas Kupstys
9a754156d7 Added support for exceptions in coroutines and added exception test
Fix bug where first coroutine ending would terminate main loop
2017-02-20 17:24:19 +02:00
Rokas Kupstys
373e667dbc Coroutine rework.
* ucontext backend (default on unix)
* setjmp backend
* fibers backend (default and required on windows)
* Fixed coroutine loop timing issues
* Fixed saving of xmm registers on x64 windows
* Fixed alignment issues
* Updated coroutine sample with cooperative fibonacci calculation.
* Disable glibc security features only when platform jump functions are used
* Removed dependency on fasm.
    * Using fiber api on windows.
    * Other platforms and compilers  will use built in assembler and .S files or API provided by platform libc.
* Replaced stack switching procs with `coroExecWithStack()` which never returns. This makes compiler always generate proper code.
2017-02-20 17:24:19 +02:00
Rokas Kupstys
a3b8bf300d Added fiber API to winlean.nim 2017-02-20 17:24:19 +02:00
Araq
9303a02d6b Merge branch 'devel' of github.com:nim-lang/Nim into devel 2017-02-17 18:04:09 +01:00
Andreas Rumpf
ba29ca0c63 Merge branch 'devel' into faster-nimsuggest 2017-02-17 10:48:01 +01:00
fenekku
e9767d8809 Fix reverse on empty openArray (#5407)
Reversing an empty `openArray` would raise a RangeError. For instance for `a: seq[int] = @[]`, we have `a.high` return `-1` but `-1` is not a `Natural`. Leaving the array as-is is the expected behaviour.
2017-02-17 08:26:49 +01:00
Araq
5620e08563 minor documentation improvements 2017-02-17 00:00:39 +01:00
Araq
5d4ed1117d distros.nim: brew usually doesn't require 'sudo' 2017-02-16 22:53:32 +01:00
araq
1811e51ff5 fixes #5392 2017-02-15 22:09:16 +01:00
Dominik Picheta
a336bf2395 Fixes parseHeader("foo:") != ("foo", @[""]). Refs #5344. 2017-02-13 21:14:29 +01:00
Ruslan Mustakov
92665e6e9a Add hash proc for cstrings (#5386) 2017-02-13 13:38:30 +01:00
Anatoly Galiulin
6fa1dba515 Add `tearDownForeignThreadGc` function (#5369) 2017-02-13 13:37:20 +01:00
Anatoly Galiulin
279e4b0451 Fixes #5382 2017-02-13 13:35:40 +01:00
flyx
ac9c2126e6 Added BiggestUInt (#5378) 2017-02-13 11:20:07 +01:00
ionel anton
636b977457 Column details for postgres. (#5380) 2017-02-13 09:09:43 +01:00
Federico Ceratto
0d1aa9225a Make walkDirRec docstring more clear (#5377) 2017-02-12 16:02:50 +01:00
Dominik Picheta
b053ded266 Fixes tests. 2017-02-11 16:49:02 +01:00
Dominik Picheta
f9f86899b5 Implement streamed async/sync downloadFile and deprecate old one. 2017-02-11 14:00:53 +01:00
Dominik Picheta
1b4067a81b Implement streamed body reading in httpclient. 2017-02-11 12:43:16 +01:00
Dominik Picheta
77071eb767 FutureStream's cb call behaviour fixed + other fixes. 2017-02-11 12:42:30 +01:00
Dominik Picheta
4a7ea8f865 Add support for Async | Sync return types in {.multisync.} macro. 2017-02-11 12:39:37 +01:00
Araq
9b8150aef1 sysio: check for IO errors for write operations 2017-02-11 00:23:22 +01:00
Dominik Picheta
2f502e2a9e Remove immediate FutureStream procs and make 'put' awaitable. 2017-02-10 20:40:32 +01:00
Dominik Picheta
ddd3d3f44a Improve implementation of takeAsync for FutureStreams. 2017-02-10 20:18:59 +01:00
Yuriy Glukhov
69fb2c6152 Fixed heapqueue.del for last elem (#5363) 2017-02-10 10:15:43 +01:00
Andreas Rumpf
0bb18d1821 introduce nimMaxHeap define to fight memory overcommit 2017-02-10 09:22:28 +01:00
Dominik Picheta
7766fdfec1 Implemented a first working version of FutureStreams. 2017-02-10 00:06:18 +01:00
Dominik Picheta
c4d5cc652f Work around issue with queues. Refs #4773. 2017-02-10 00:05:42 +01:00
Dominik Picheta
3286480985 Improve error message when a nil future is await'ed. 2017-02-09 23:07:10 +01:00
Dominik Picheta
e189004a03 WIP implementation of FutureStream. 2017-02-09 22:46:20 +01:00
Araq
a20b4c674e sysio: minor improvements 2017-02-09 20:11:54 +01:00
Andreas Rumpf
52c38f8535 make tests green again 2017-02-08 22:42:48 +01:00
Andreas Rumpf
d23eb79849 make tests green again 2017-02-08 22:21:01 +01:00
Araq
3caf108425 system/unicode: check for buffer overflows; refs #5284 2017-02-08 15:22:36 +01:00
Araq
346ea6d171 system.nim: don't use deprecated symbols/constructs 2017-02-08 14:55:30 +01:00
Araq
794d36cf31 fixes #5349 2017-02-08 14:33:05 +01:00
Anatoly Galiulin
61b4bb5af5 Mark setupForeignThreadGc and initGC as gcsafe (#5353) 2017-02-08 10:26:15 +01:00
Arne Döring
ca39e113d5 fix in using the linenoise function (#5351) 2017-02-08 10:25:57 +01:00
Andreas Rumpf
41d3660e3a Merge pull request #5348 from c-blake/devel
Update Stat to work with modern Unix impls
2017-02-08 08:20:38 +01:00