summaryrefslogtreecommitdiff
path: root/core
AgeCommit message (Collapse)Author
2021-04-30cleanup(core): use ZeroCopyBuf for serialize & encode bindings (#10435)Aaron O'Mullan
2021-04-30refactor(core): provide builtins as an Extension (#10449)Aaron O'Mullan
2021-04-30Rename crate_ops to extensions (#10431)Andy Hayden
2021-04-30cleanup(core): replace OpResponse with OpResult (#10434)Aaron O'Mullan
Drop the Value/Buffer enum since #10432 allows buffers to be serialized rust => v8
2021-04-30refactor(core): initialize extensions in runtime constructor (#10421)Aaron O'Mullan
This ensures that provided extensions are all correctly setup and ready to use once the JsRuntime constructor returns Note: this will also initialize ops for to-be-snapshotted runtimes
2021-04-30feat(serde_v8): ZeroCopyBuf (#10432)Aaron O'Mullan
Bidirectional zero-copy serialization of buffers between v8 & rust that can be nested in structs/tuples/etc.
2021-04-30refactor(core.js): provide window.__bootstrap (#10423)Aaron O'Mullan
2021-04-28refactor(extensions): reintroduce builder (#10412)Aaron O'Mullan
2021-04-28enable error-on-warning (#10410)Ryan Dahl
Only on linux and osx. Fixes one warning.
2021-04-28core: introduce extensions (#9800)Aaron O'Mullan
Extensions allow declarative extensions to "JsRuntime" (ops, state, JS or middleware). This allows for: - `op_crates` to be plug-and-play & self-contained, reducing complexity leaked to consumers - op middleware (like metrics_op) to be opt-in and for new middleware (unstable, tracing,...) - `MainWorker` and `WebWorker` to be composable, allowing users to extend workers with their ops whilst benefiting from the other infrastructure (inspector, etc...) In short extensions improve deno's modularity, reducing complexity and leaky abstractions for embedders and the internal codebase.
2021-04-28refactor(core): simplify module loading code (#10385)Bartek Iwańczuk
General cleanup of module loading code, tried to reduce indentation in various methods on "JsRuntime" to improve readability. Added "JsRuntime::handle_scope" helper function, which returns a "v8::HandleScope". This was done to reduce a code pattern that happens all over the "deno_core". Additionally if event loop hangs during loading of dynamic modules a list of currently pending dynamic imports is printed.
2021-04-28chore: upgrade dprint plugins (#10397)Satya Rohith
2021-04-26fix(tls): throw meaningful error when hostname is invalid (#10387)Bert Belder
`InvalidDNSNameError` is thrown when a string is not a valid hostname, e.g. it contains invalid characters, or starts with a numeric digit. It does not involve a (failed) DNS lookup.
2021-04-26feat(core): enable wasm threading support (#10116)Casper Beyer
2021-04-26remove #![deny(warnings)] (#10376)Ryan Dahl
Prefer RUSTFLAGS="-D warnings" to prevent warnings, but cannot enable yet due to #10378.
2021-04-25refactor(core): move op cache sync responsibility to rust space (#10340)Aaron O'Mullan
Even if bootstrapping the JS runtime is low level, it's an abstraction leak of core to require users to call `Deno.core.ops()` in JS space. So instead we're introducing a `JsRuntime::sync_ops_cache()` method, once we have runtime extensions a new runtime will ensure the ops cache is setup (for the provided extensions) and then loading/unloading plugins should be the only operations that require op cache syncs
2021-04-25refactor(core): move builtin ops to their own file (#10336)Aaron O'Mullan
2021-04-25feat(core): allow async opcalls in snapshots (#10308)Aaron O'Mullan
2021-04-24docs: updated link (#10345)Anssi Eteläniemi
2021-04-23refactor(core): rename send() to opcall() (#10307)Aaron O'Mullan
I think it's a better fit since recv() was killed and opcall <> syscall (send/recv was too reminiscent of request/response and custom payloads)
2021-04-23chore: release crates (#10327)Luca Casonato
Release crates for the cli 1.9.2 release.
2021-04-23chore: remove dead code (#10321)Ryan Dahl
2021-04-21refactor(core): simplify error handling (#10297)Aaron O'Mullan
- register builtin v8 errors in core.js so consumers don't have to - remove complexity of error args handling (consumers must provide a constructor with custom args, core simply provides msg arg)
2021-04-21refactor(core): kill recv() and init() (#10299)Aaron O'Mullan
`init()` was previously needed to init the shared queue, but now that it's gone `init()` only registers the async msg handler which is snapshot safe and constant since the op layer refactor.
2021-04-21chore: release crates (#10269)Bartek Iwańczuk
* Revert "tooling(bench_util): benching and profiling utilities (#10223)" This reverts commit 733a00030582375c43fa156e978f25df6ecc9e9a. * Upgrade notify
2021-04-20chore: update copyright headers (#10243)Yoshiya Hinosawa
2021-04-19refactor(core): move SerializablePkg to serde_v8 (#10231)Aaron O'Mullan
2021-04-18cleanup(core): simplify op_async(), drop need for try_dispatch_op() (#10240)Aaron O'Mullan
2021-04-18tooling(bench_util): benching and profiling utilities (#10223)Aaron O'Mullan
2021-04-18refactor(core): remove ZeroCopyBuf's dep on the bindings mod (#10232)Aaron O'Mullan
Also cleanup `bindings::deserialize()/decode()` so they use the `ZeroCopyBuf` abstraction rather than reimplementing it. This cleanup will facilitate moving `ZeroCopyBuf` to `serde_v8` since it's now self contained and there are no other `get_backing_store_slice()` callers.
2021-04-14fix(core): better "missing type" GothamState error (#10189)Ben Noordhuis
Include the type name in the error message so you know what to look for.
2021-04-13chore: release crates (#10164)Bartek Iwańczuk
2021-04-13fix(core): remove wasm-test-streaming flag (#10158)Casper Beyer
2021-04-13upgrade: rusty_v8 0.22.1 (V8 9.1.269.5) (#10159)Bert Belder
2021-04-13upgrade: rusty_v8 0.22.0 (V8 9.1.269.2) (#10152)Bert Belder
2021-04-12perf(core/ops): avoid allocs when returning primitives (#10149)Aaron O'Mullan
2021-04-12core: remove some unnecessary heap allocationsBen Noordhuis
2021-04-12core: let embedders plug in their own V8 platformBen Noordhuis
Fixes #9912.
2021-04-12refactor(deno): remove concept of bin & json ops (#10145)Aaron O'Mullan
2021-04-12feat: Add Deno.memoryUsage() (#9986)Aaron O'Mullan
2021-04-11core: avoid async op future reboxing to bundle PromiseId (#10123)Aaron O'Mullan
2021-04-09perf: use BTreeMap for ResourceTable (#10074)Aaron O'Mullan
2021-04-09perf(core): use BTreeMap for GothamState (#10073)Aaron O'Mullan
This commit replaces GothamState's internal HashMap with a BTreeMap to improve performance. OpState/GothamState keys by TypeId which is essentially an opaque u64. For small sets of integer keys BTreeMap outperforms HashMap mainly since it removes the hashing overhead and Eq/Comp on integer-like types is very cheap, it should also have a smaller memory footprint. We only use ~30 unique types and thus ~30 unique keys to access OpState, so the keyset is small and immutable throughout the life of a JsRuntime, there's no meaningful churn in keys added/removed.
2021-04-09fix: async op error stacktraces (#10080)Nayeem Rahman
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
2021-04-08chore: update deps (#10058)Luca Casonato
This commit updates crate dependencies.
2021-04-08fix(core): error handling in examples (#9867)Inteon
2021-04-07perf(core.js): introduce promise ring (#9979)Aaron O'Mullan
This is another optimization to help improve the baseline overhead of async ops. It shaves off ~55ns/op or ~7% of the current total async op overhead. It achieves these gains by taking advantage of the sequential nature of promise IDs and optimistically stores them sequentially in a pre-allocated circular buffer and fallbacks to the promise Map for slow to resolve promises.
2021-04-05core: remove serde_json-isms in op_close() and op_resources() (#10026)Aaron O'Mullan
Core no longer uses `serde_json` now, besides re-exporting it or in the module specifier tests
2021-04-04fix: Properly await already evaluating dynamic imports (#9984)Nayeem Rahman
2021-04-04perf(serde_v8): introduce Serializable boxable object (#9983)Aaron O'Mullan