Commit graph

123 commits

Author SHA1 Message Date
Dominik Picheta
b3469c43a6 Implemented 'await connect' fully. Fixed a buffering and 'reqReg' bug.
* reqReq did not reset lastReq to reqNil, this caused problems in the
new tasyncitermacro test. (await accept stopped accepting requests after
some arbitrary amount have been accepted).
* Rewritten and moved tasyncitermacro to tests/run/ so that the tester
actually tests whether it works at runtime.
* tasynciterraw is now a copy of tasyncitermacro after macro expansion.
It will be used as a control test, useful if the macro starts generating
incorrect code.
2013-08-03 14:19:17 +01:00
Dominik Picheta
e42f877664 Optimised `await` on custom async procs.
* The async proc is now invoked immediately after the 'await' request
is processed. This means that the iterator is executed until it yields
with a request which cannot be immediately satisfied (e.g. readLine)
after which point a
select() call will need to be made. Previously the async proc would only
be added to the list of requests, the event loop would need to start
over and thus would need to go
through each request again before invoking the iterator and reaching a
request which could not be immediately satisfied.
* This was implemented by recursively calling the processWorker
procedure in asyncio.nim. In the future it may be of benefit to also
perform this for reqReg.
* When the awaited user-defined async proc finishes, the parent worker
will be executed, the same optimisation has been used for that case.
* The way that this optimisation is implemented means that even multiple
levels of awaited user-defined procs will be quickly processed. (Look at
the tasyncitermacro test, the auth procs are arranged this way to test
this)
2013-07-31 23:27:07 +01:00
Dominik Picheta
70d67daa14 Introduced 'reg' keyword, and changed the await behaviour for custom
procs.
2013-07-31 19:28:37 +01:00
Dominik Picheta
426c2d6c01 Implemented default arguments for async procs. 2013-07-28 14:41:09 +01:00
Dominik Picheta
2330c95b22 Implemented genSym for async function calls. 2013-07-28 13:50:32 +01:00
Dominik Picheta
c5ff9650f7 Changed some asyncio macro code to use the new genSym. 2013-07-25 22:13:37 +01:00
Dominik Picheta
3e7ea859ec Merge branch 'master' into asyncmacro 2013-07-25 19:33:08 +01:00
Araq
b1d4dfa6b1 fixes #544 2013-07-24 22:32:09 +02:00
Dominik Picheta
a1a8925692 Calling an async proc with invalid arguments will now fail at compile-time. 2013-07-21 14:28:02 +01:00
Dominik Picheta
d15e67e020 Better param passing. Implemented send, readLine and support for
documentation stubs.
2013-07-21 13:58:54 +01:00
Dominik Picheta
75893d1b36 First implementation of the async/await-like system with macros. 2013-07-20 23:42:10 +01:00
Araq
dfe195a4a1 fixes #501 2013-07-01 20:25:38 +02:00
Araq
b6f2902905 Merge branch 'master' of github.com:Araq/Nimrod 2013-06-27 19:57:24 +02:00
Dominik Picheta
a9f2c3ffaf Fixed OSError + recvLine deprecation warnings. 2013-06-27 15:06:30 +01:00
Araq
8d4f5038d0 fixes #488 2013-06-27 08:19:03 +02:00
Araq
2aaa8f7909 implemented dataflow analysis; activate via --warning[Uninit]:on 2013-06-04 21:58:39 +02:00
Araq
24955f8358 fixes #458 2013-05-31 02:27:05 +02:00
Araq
e3f93241c3 Revert "fix tforwardgeneric"
This reverts commit d82a032566.
2013-05-27 23:18:15 +02:00
Araq
c67abd7e61 Revert "more test made green"
This reverts commit 911e6e710f.
2013-05-27 23:16:56 +02:00
Araq
e1b668c868 Revert "test cases for the new features"
This reverts commit 66653e8f14.
2013-05-27 23:16:00 +02:00
Zahary Karadjov
66653e8f14 test cases for the new features 2013-05-26 22:15:30 +03:00
Zahary Karadjov
911e6e710f more test made green
the lambda lifting was trying too hard to ignore generic prods
isGenericRoutine was producing false-negatives and only
this allowed for some of the warning and error messages
to be triggered.

some files with mixed line endings were fixed
2013-05-26 21:06:39 +03:00
Zahary Karadjov
d82a032566 fix tforwardgeneric 2013-05-26 15:12:09 +03:00
Zahary Karadjov
1d29d24465 documented the `noforward` pragma 2013-05-12 16:14:28 +03:00
Araq
2d39a18faa better effects handling for callbacks 2013-05-09 03:20:55 +02:00
Araq
af441e607f fixes #117 2013-05-04 13:21:36 +02:00
Araq
75b508032b added manyloc test suite; --path now relative to project dir if not absolute 2013-04-13 21:55:02 +02:00
Araq
18fbaab216 fixes #310 2013-04-13 01:09:15 +02:00
Araq
3cb3813eed fixes #287; bugfix: subrange checking is performed again 2013-04-12 16:24:58 +02:00
Araq
45185f84df cleanup of tests; use 'koch install' instead of 'install.sh' for a bootstrapping build 2013-04-11 17:28:17 +02:00
Araq
dc65ccde01 fixes #368 2013-04-08 19:58:16 +02:00
Araq
0761b449ed fixes #304 2013-03-18 00:22:21 +01:00
Araq
6ed18a8b24 fixes #366 2013-03-17 20:11:16 +01:00
Grzegorz Adam Hankiewicz
72a3e21f28 Removes executable bit for text files. 2013-03-16 23:53:07 +01:00
Zahary Karadjov
81a3585872 merged upstream master 2013-01-27 23:41:45 +02:00
Araq
b0b4150df1 Merge pull request #316 from gradha/pr_renames_each_to_map
Renames each proc to map, each is left deprecated.
2013-01-23 13:30:26 -08:00
Grzegorz Adam Hankiewicz
91700f29e7 Renames each proc to map, each is left deprecated. 2013-01-22 21:41:26 +01:00
Araq
09e4b194f5 bootstrapping works again 2013-01-22 00:37:33 +01:00
Araq
0d978c4a9a fixed some closure related bugs 2013-01-22 00:29:54 +01:00
Araq
9257c29ffd small bugfix for lambdalifting; preparations for a better testing framework 2013-01-19 02:09:08 +01:00
Araq
e6fc044107 fixes #299 2013-01-08 18:20:40 +01:00
Araq
20a5e37169 fixes #270 2013-01-08 17:23:52 +01:00
Araq
1bc5ff6dc9 fixes #292 2013-01-08 08:11:21 +01:00
Dominik Picheta
da609fc445 Fixed many deprecation warnings. asyncio.recvLine now throws an
exception when an error occurs. Added sockets.SocketError.
2012-12-23 14:05:16 +00:00
Araq
1d842e8b75 Merge branch 'master' of github.com:Araq/Nimrod 2012-12-06 07:10:19 +01:00
Araq
38ab30d153 implemented generic converters 2012-12-05 22:03:36 +01:00
Araq
6ce15652d3 Merge branch 'master' of github.com:Araq/Nimrod 2012-12-02 11:13:05 +01:00
Araq
c98e3d2c27 implements 'export' feature 2012-12-01 19:10:47 +01:00
Zahary Karadjov
e9e22ccb2a track the "owner" heap object in the ref write barrier
See the papers for reference counting with heap sliding views for details:
2012-12-01 15:37:13 +02:00
Araq
f503439e81 implements 'import dir/module' without quotes 2012-11-30 19:57:23 +01:00