Commit graph

2,266 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
ab534804c6 Merge branch 'master' into asyncmacro 2013-07-31 23:44:47 +01:00
Dominik Picheta
ec86d5db0f Improved documentation for macros.newProc. 2013-07-31 23:44:09 +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
Araq
9589acd00e fixes #532 2013-08-01 00:16:29 +02:00
Araq
3ae6043e7e Merge pull request #533 from gradha/pr_helper_procs
Adds some helper procs
2013-07-31 12:59:22 -07:00
Araq
3ab4b3d58f Merge pull request #530 from EXetoC/master
Missing SDL_image symbols
2013-07-31 12:48:33 -07:00
Araq
c96a4406e4 Merge pull request #523 from exhu/x11fix
X11, cairo bindings fixes
2013-07-31 12:47:41 -07:00
Araq
731c6f9083 'nimrod pretty' usable 2013-07-31 20:35:04 +02:00
Dominik Picheta
70d67daa14 Introduced 'reg' keyword, and changed the await behaviour for custom
procs.
2013-07-31 19:28:37 +01:00
Araq
805959378d 'nirmod pretty': almost working 2013-07-31 02:50:17 +02:00
Araq
e5be2e9f97 'nimrod pretty': next steps 2013-07-30 21:10:45 +02:00
Araq
d640121ce6 lfFullExternalName for 'nimrod pretty' 2013-07-30 17:15:58 +02:00
Araq
fd2a808266 fixes token's column information 2013-07-30 08:45:00 +02:00
Araq
28ad262a46 'nimrod pretty': next steps, doesn't work yet 2013-07-29 23:52:08 +02:00
Araq
6810a0e3e3 'nimrod pretty' command: next steps 2013-07-29 22:56:32 +02:00
Araq
d6d665b0c0 Merge branch 'master' of github.com:Araq/Nimrod 2013-07-29 01:21:53 +02:00
Araq
ef975d277a new vm: further progress 2013-07-29 01:21:32 +02:00
Dominik Picheta
ae64089e53 Fixed crash when worker has just been registered and didn't get executed
yet.
2013-07-28 18:28:50 +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
c5c6ef6e2b Fixes graphics.drawEllipse.
It failed because a Natural cannot be negative but drawEllipse tried to
set negative values to a Natural variable; this variable's type was
changed to an Int.
2013-07-27 11:18:13 +01:00
Dominik Picheta
e33af13ae3 Fixes #543.
Changed signature of SetVideoMode so that the flags param is a uint32.
2013-07-27 11:03:28 +01:00
Araq
27b7ecbbff new vm: lots of fixes 2013-07-27 01:28:31 +02:00
Araq
fca23d1675 bugfix: system.& for sequences 2013-07-27 01:28:13 +02:00
Araq
698eac2a94 new vm: can execute simple programs 2013-07-26 12:17:36 +02:00
Dominik Picheta
adc74f8ab0 Merge branch 'master' into asyncmacro 2013-07-25 23:24:30 +01:00
Araq
05108cf81c Merge branch 'master' of github.com:Araq/Nimrod 2013-07-25 23:40:29 +02:00
Araq
f3a2eec13b attempt to make C codegen aware of 'gensym' 2013-07-25 23:40:15 +02:00
Dominik Picheta
3ead23cb26 Merge branch 'master' into asyncmacro 2013-07-25 22:16:06 +01:00
Dominik Picheta
e360d048ba Added macros.newIfStmt and macros.newVarStmt. 2013-07-25 22:15:34 +01:00
Dominik Picheta
c5ff9650f7 Changed some asyncio macro code to use the new genSym. 2013-07-25 22:13:37 +01:00
Araq
a59874e312 Merge branch 'master' of github.com:Araq/Nimrod 2013-07-25 22:40:47 +02:00
Araq
02c86567ee new vm: next steps 2013-07-25 22:40:25 +02:00
Dominik Picheta
2cedc1d1af Merge branch 'master' into asyncmacro 2013-07-25 20:31:47 +01:00
Araq
2c3d1fa954 bugfix: gensym 2013-07-25 21:25:40 +02:00
Dominik Picheta
3e7ea859ec Merge branch 'master' into asyncmacro 2013-07-25 19:33:08 +01:00
Araq
3e0899359b new evaluation engine: next steps 2013-07-25 08:37:37 +02:00
Araq
bdbf0f863d Merge branch 'master' of github.com:Araq/Nimrod 2013-07-24 23:07:45 +02:00
Araq
9acdf94cc0 fixes #531 2013-07-24 23:07:28 +02:00
Araq
8ac68a4d94 Merge pull request #527 from jbe/master
export pointer types for SDL event objects
2013-07-24 13:35:20 -07:00
Araq
b1d4dfa6b1 fixes #544 2013-07-24 22:32:09 +02:00
Araq
f9426bfcd5 added macros.genSym 2013-07-24 21:58:17 +02:00
Araq
b403b41aec Merge branch 'master' of github.com:Araq/Nimrod 2013-07-24 21:40:08 +02:00
Araq
b30e237a37 first steps to a new evaluation engine 2013-07-24 21:39:39 +02:00
Dominik Picheta
d8659eaaa2 Another docs fix for asyncio. 2013-07-21 15:18:44 +01:00
Dominik Picheta
1e1a583903 Fixes problems with async docs. 2013-07-21 14:51:25 +01: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
84ea209fe1 Merge branch 'master' into asyncmacro 2013-07-21 11:09:20 +01:00