Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Drop the Value/Buffer enum since #10432 allows buffers to be serialized rust => v8
|
|
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
|
|
Bidirectional zero-copy serialization of buffers between v8 & rust
that can be nested in structs/tuples/etc.
|
|
|
|
|
|
Only on linux and osx. Fixes one warning.
|
|
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.
|
|
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.
|
|
|
|
`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.
|
|
|
|
Prefer RUSTFLAGS="-D warnings" to prevent warnings, but cannot
enable yet due to #10378.
|
|
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
|
|
|
|
|
|
|
|
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)
|
|
Release crates for the cli 1.9.2 release.
|
|
|
|
- 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)
|
|
`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.
|
|
* Revert "tooling(bench_util): benching and profiling utilities (#10223)"
This reverts commit 733a00030582375c43fa156e978f25df6ecc9e9a.
* Upgrade notify
|
|
|
|
|
|
|
|
|
|
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.
|
|
Include the type name in the error message so you know what to look for.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Fixes #9912.
|
|
|
|
|
|
|
|
|
|
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.
|
|
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
|
|
This commit updates crate dependencies.
|
|
|
|
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.
|
|
Core no longer uses `serde_json` now, besides re-exporting it or in the module specifier tests
|
|
|
|
|