summaryrefslogtreecommitdiff
path: root/core/lib.rs
AgeCommit message (Collapse)Author
2020-02-03refactor: Use Tokio's single-threaded runtime (#3844)Ryan Dahl
This change simplifies how we execute V8. Previously V8 Isolates jumped around threads every time they were woken up. This was overly complex and potentially hurting performance in a myriad ways. Now isolates run on their own dedicated thread and never move. - blocking_json spawns a thread and does not use a thread pool - op_host_poll_worker and op_host_resume_worker are non-operational - removes Worker::get_message and Worker::post_message - ThreadSafeState::workers table contains WorkerChannel entries instead of actual Worker instances. - MainWorker and CompilerWorker are no longer Futures. - The multi-threaded version of deno_core_http_bench was removed. - AyncOps no longer need to be Send + Sync This PR is very large and several tests were disabled to speed integration: - installer_test_local_module_run - installer_test_remote_module_run - _015_duplicate_parallel_import - _026_workers
2020-02-01feat: support crate imports in deno_typescript (#3814)Andy Finch
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2020-01-07core: factor out EsIsolate from Isolate (#3613)Bartek Iwańczuk
2020-01-06refactor: remove core/libdeno.rs (#3611)Bartek Iwańczuk
2020-01-06error on warnings (#3612)Ry Dahl
2020-01-06merge libdeno::DenoIsolate into core::Isolate (#3605)Bartek Iwańczuk
2020-01-05Replace libdeno with rusty_v8 (#3556)Ry Dahl
2020-01-02Happy new year! (#3578)Ry Dahl
2019-12-05feat: first pass at native plugins (#3372)Andy Finch
2019-10-23core: Add ResourceTable (#3150)Bartek Iwańczuk
2019-09-30feat: op registration in core (#3002)Bartek Iwańczuk
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-11Refactor error to use dynamic dispatch and traitsBert Belder
This is in preperation for dynamic import (#1789), which is more easily implemented when errors are dynamic.
2019-06-30core: return useful error when import path has no prefix like ./Bert Belder
2019-06-12Move ModuleSpecifier to //core (#2509)Bartek Iwańczuk
2019-05-09core: Privatize ModuleNameMap SymbolicModule deno_buf (#2324)Bartek Iwańczuk
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-02Add deno_core::RecursiveLoad for async module loading (#2034)Ryan Dahl
2019-03-18Integrate //core into existing code baseRyan Dahl
This disables a few tests which are broken still: - tests/error_004_missing_module.test - tests/error_005_missing_dynamic_import.test - tests/error_006_import_ext_failure.test - repl_test test_set_timeout - repl_test test_async_op - repl_test test_set_timeout_interlaced - all of permission_prompt_test
2019-03-15core: Behavior shouldn't be genericRyan Dahl
We always pass around Box<[u8]>, and adding this generic is an unnecessary complication. Add deno_core_http_bench_test to test.py sharedQueue works on deno_core_http_bench
2019-03-11core: Abstract out Behavior from Isolate (#1904)Ryan Dahl
Move v8_set_flags and v8_version to core. (The idea is that src/ should not depend on libdeno.rs anymore. This is a step towards that.)
2019-02-28Use deno_core::JSError in deno (#1855)Ryan Dahl
src/js_errors.rs takes care of source maps and color while core/js_errors.rs is just the basic struct.
2019-02-26deno_core (#1827)Ryan Dahl
A new low-level crate with focus on speed. This doesn't yet hook into the existing code base.