about summary refs log tree commit diff stats
path: root/src/io/dynstream.nim
Commit message (Collapse)AuthorAgeFilesLines
* Fixes for Nim 2.2bptato2024-07-291-0/+269
| | | | | | | | | * xmlhttprequest: fix missing import * painter: generic tuple workaround * dynstream: merge module with implementations (so it will work with vtables) Not enabling vtables yet since it doesn't work with refc.
* js: fix various leaks etc.bptato2024-05-031-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously we didn't actually free the main JS runtime, probably because you can't do this without first waiting for JS to unwind the stack. (This has the unfortunate effect that code now *can* run after quit(). TODO: find a fix for this.) This isn't a huge problem per se, we only have one of these and the OS can clean it up. However, it also disabled the JS_FreeRuntime leak check, which resulted in sieve-like behavior (manual refcounting is a pain). So now we choose the other tradeoff: quit no longer runs exitnow, but it waits for the event loop to run to the end and only then exits the browser. Then, before exit we free the JS context & runtime, and also all JS values allocated by config. Fixes: * fix `ad' flag not being set for just one siteconf/omnirule * fix various leaks (since leak check is enabled now) * use ptr UncheckedArray[JSValue] for QJS bindings that take an array * allow JSAtom in jsgetprop etc., also disallow int types other than uint32 * do not set a destructor for globals
* pager: fix broken writeToFilebptato2024-03-291-0/+3
|
* io: derive DynStream from RootObj (not Stream)bptato2024-03-241-44/+26
| | | | | | | | This way they are no longer compatible, but we no longer need them to be compatible anyway. (This also forces us to throw out the old serialize module, and use packet writers everywhere.)
* bufreader: add initPacketReaderbptato2024-03-241-0/+7
|
* io: add bufreaderbptato2024-03-211-0/+7
| | | | analogous to bufwriter
* io: add BuferedWriterbptato2024-03-161-0/+3
| | | | | | | | | | Unsurprisingly enough, calling `write` a million times is never going to be very fast. BufferedWriter basically does the same thing as serialize.swrite did, but queues up writes in batches before sending them. TODO: give sread a similar treatment
* io: add dynstreambptato2024-03-121-0/+82
a new abstraction that we derive posixstream from; hopefully with time we can get rid of std/streams