summaryrefslogtreecommitdiff
path: root/core/libdeno/modules_test.cc
AgeCommit message (Collapse)Author
2020-01-05Replace libdeno with rusty_v8 (#3556)Ry Dahl
2020-01-02Happy new year! (#3578)Ry Dahl
2019-08-07Add op_id throughout op API (#2734)Ryan Dahl
Removes the magic number hack to switch between flatbuffers and the minimal dispatcher. Adds machinery to pass the op_id through the shared_queue.
2019-07-24Add error handling for dynamic imports to libdeno (#2678)Bert Belder
2019-06-10Expose dynamic import in core (#2472)Ryan Dahl
2019-06-06libdeno: expose dynamic import (#2461)Ryan Dahl
2019-05-01Refactor zero-copy buffers for performance and to prevent memory leaksBert Belder
* In order to prevent ArrayBuffers from getting garbage collected by V8, we used to store a v8::Persistent<ArrayBuffer> in a map. This patch introduces a custom ArrayBuffer allocator which doesn't use Persistent handles, but instead stores a pointer to the actual ArrayBuffer data alongside with a reference count. Since creating Persistent handles has quite a bit of overhead, this change significantly increases performance. Various HTTP server benchmarks report about 5-10% more requests per second than before. * Previously the Persistent handle that prevented garbage collection had to be released manually, and this wasn't always done, which was causing memory leaks. This has been resolved by introducing a new `PinnedBuf` type in both Rust and C++ that automatically re-enables garbage collection when it goes out of scope. * Zero-copy buffers are now correctly wrapped in an Option if there is a possibility that they're not present. This clears up a correctness issue where we were creating zero-length slices from a null pointer, which is against the rules.
2019-04-08core: snapshot improvements (#2052)Ryan Dahl
* Moves how snapshots are supplied to the Isolate. Previously they were given by Behavior::startup_data() but it was only called once at startup. It makes more sense (and simplifies Behavior) to pass it to the constructor of Isolate. * Adds new libdeno type deno_snapshot instead of overloading deno_buf. * Adds new libdeno method to delete snapshot deno_snapshot_delete(). * Renames deno_get_snapshot() to deno_snapshot_new(). * Makes StartupData hold references to snapshots. This was implicit when it previously held a deno_buf but is made explicit now. Note that include_bytes!() returns a &'static [u8] and we want to avoid copying that.
2019-03-30Move //libdeno to //core/libdeno (#2015)Ryan Dahl
Fixes some sed errors introduced in c43cfe. Unfortunately moving libdeno required splitting build.rs into two parts, one for cli and one for core. I've also removed the arm64 build - it's complicating things at this re-org and we're not even testing it. I need to swing back to it and get tools/test.py running for it.